Let's assume that the state facing the teacher is 1 and the state facing away from the teacher is-1. Obviously, as long as a person turns around, the original state will be multiplied by (-1), (both face-to-face and back-to-back turns).
The initial state is the 45th power of 1 = 1, and all states facing away from teachers are the 45th power of (-1) =- 1.
After the first turn, the result is: 1 times the sixth power of (-1) = 1 (because six people turn around).
The second turn is based on the first turn, and six people turn, so the result: 1 times the sixth power of (-1) = 1 (no matter which six people turn, as long as one person turns, it will be multiplied by-1).
The second time, the third time 2, 3, ... n times, etc. will always be 1, and it is impossible to reach the state of-1.
So it is impossible to turn your back on the teacher.