press the flag press space to reset
Every square moves to a place where it is adjacent to another square. Eventually all squares will converge into a rectangle or into a rectangle boundary.