We can see this from the following fact: if a solution exists, any solution will still be valid after moving AiA_iAi that satisfies the above condition to the end.
为啥啊