For the transfer of seats, I suggest this operation. Suppose there are 60 people in the class, 32 men and 28 women, and two people sit at the same table.
1. Divide men and women first, 16 for men, 14 for women, make 1- 16 for tickets, boys draw, the same number at the same table, and girls do the same.
2. Mark the seat pair with coordinates on the front and back of the seat. When drawing lots, let the girls draw first, and then the boys draw again. The teacher should analyze when drawing lots, and the probability of continuous drawing lots is the same.
3. Finally, if B is sitting too high in front, give him a chance to choose seat A (same sex) in the back. If the original seat of A and its original seat are agreed by four people, let the two seats of A and B be adjusted freely. Any one disagrees, and no adjustment is allowed.
4. If the remaining student C is not satisfied with the present situation, refer to 3 and ask him to choose a seat for D (one chance for each). As long as one of the four C/D people disagrees, it will not be adjusted. If four people agree, four people can adjust at will; In addition, in this case, after the adjustment, students around C/D will say that they agree or disagree, and more than half of them will recover.
This adjustment scheme relies on random and fair voting. After a round of adjustment, I believe everyone will adapt. Of course, before implementation, teachers should explain the whole process of the scheme.