A Construction of Magic Cubes