>! The dots move in a direction until they hit a side of the square or another dot. The direction the dots are moving rotates anticlockwise each step. The top dot in the first square begins by moving left, eventually hitting the left wall. The direction it moves rotates anticlockwise from left to down for the next square, and it moves down until it hits the bottom side of the square. Finally, the direction it moves rotates from down to right, and the dot moves right until it hits the right side of the square. The initial direction for the other two dots is right. They both move right until they hit the right side of the square. Then for the second square, their direction rotates anticlockwise from right to up. They move up and the top dot hits the top side of the square, while the bottom dot runs into the dot above it. Finally, the direction they move rotates from up to left, and the dots move left until they hit the left side of the square. >! [![solution][1]][1] [1]: https://i.sstatic.net/t7eCT.png