In the country of Mara there are several castles. Three roads lead from each castle. A knight left from one of the castles. Traveling along the roads, he turns from each castle standing in his way, either to the right or to the left depending on the road on which he came. The knight never turns to the side which he turned before it. Prove that one day he will return to the original castle.