Structures of β-alumina-type compounds in terms of stacking of building units