In an examination hall, there are 4 rows of chairs. Each row has 8 chairs 1 behind the other. There are 2 classes sitting for the examination with 16 students in each class. It is desired that in each row all students belong to the same class and that no 2 adjacent rows are allotted to the same class. In how many ways can these 12 students be seated?