Surround the Cat

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

This is an interactive problem.

Consider a hexagonal tiling on the plane, as shown in the picture below.

Fig. 1: What the plane looks like.

The house you built for your cat is a regular hexagon of side N=10N = 10. Its six corners are located at (9,0)(9,0), (9,9)(9,9), (0,9)(0,9), (9,0)(-9,0), (9,9)(-9,-9), and (0,9)(0,-9).

For example, for N=3N = 3 the house would look like this:

Now the cat wants to escape. Thus, you need to place some rocks in the house to surround the cat so that it can not escape.

Initially, the cat is located at (0,0)(0, 0). Every second, you can choose a location in the house and place a rock. Note that you cannot place a rock at the cat's current location. After that, the cat will choose a location that is adjacent to its current location and does not contain a rock, and move there.

Once the cat reaches the boundary of the house, it will escape and win. On the other hand, if the cat cannot choose a valid move, you win. Try to surround the cat so that it will not escape.