5.083 Twelve students are given two versions of a test (a total of six identical tickets of each version). In how many ways can the students be seated in two rows so that those sitting next to each other do not have the same ticket, and those sitting one behind the other have the same version?
Solution. Six students with version №1 can be arranged in one row in 6! ways (the number of permutations of six elements). The same is true for six students with version №2. The number of different ways (without considering which row will get version №1) is (6!) ${ }^{2}$. The final result is $(6!)^{2}+(6!)^{2}$ ways, taking into account the two ways of distributing the versions among the rows.

Answer: (6! $)^{2}$.