A sequence of transformations related to the formation of M3X2-type superstructures