Deterministic synthesis of phase pure 2D perovskites via progressive transformation of layer thickness