Magnetic beads attract each other forming chains. We pushed such chains into an inclined Hele-Shaw cell and discovered that they spontaneously form self-similar patterns. Depending on the angle of inclination of the cell, two completely different situations emerge, namely, above the static friction angle the patterns resemble the stacking of a rope and below they look similar to a fortress from above. Moreover, locally the first pattern forms a square lattice, while the second pattern exhibits triangular symmetry. For both patterns, the size distributions of enclosed areas follow power laws. We characterize the morphological transition between the two patterns experimentally and numerically and explain the change in polarization as a competition between friction-induced buckling and gravity.