| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 1024 MB | 241 | 64 | 41 | 21.809% |
This is an interactive problem.
Little Misha plays a child's game with a robot. In this game, the robot stands on a field which is divided into 3ドル \times 3$ squares and surrounded by borders. The game begins at the center squares and consists in making ten actions. Each action is either declamation of a phrase or an attempt to move into one of the neighboring squares. Declamation is used to wait, or simply for amusement.
One of the squares is special, but Misha does not know in advance which one. The robot reports when it moves into the special square. The goal of the game is to move into the special square precisely during the tenth action.
To communicate with the robot, Misha uses text input and output. The following commands are recognized:
echo phrase --- declamation of phrase,move north --- moving one square to the north,move east --- moving one square to the east,move south --- moving one square to the south,move west --- moving one square to the west.For each declamation command, the robot loudly reads the given phrase, and also prints it back in text. During a declamation, the robot does not move. The robot is guaranteed to correctly handle phrases which consist of characters with ASCII codes from 32ドル$ to 126ドル$ inclusive and are at most 256ドル$ characters long.
For each movement command, the robot prints back one of the four words:
bump if instead of moving, the robot hit a barrier, in which case, it remains on the same square,moved if the robot successfully moved into a common square,found if the robot moved into the special square during one of the first nine actions,win if the robot moved into the special square during the tenth action.Help Misha to play this game in such a way that, during the tenth action, the robot prints the desired word win.
The solution must print commands to the standard output, one command per line. To prevent output buffering, flush the output buffer after each command you issue: this can be done by using, for example, fflush(stdout) in C or C++, System.out.flush() in Java, flush(output) in Pascal or sys.stdout.flush() in Python.
The answer for each command is printed back to the solution's standard input on a separate line.
After printing ten commands, the solution must terminate correctly.
move north move east move south move west move east move east move south echo Ready! echo Steady... move north
moved moved found moved found bump moved Ready! Steady... win
In the given example, the special square lies to the east from the center. It is guaranteed that this test will be the first when checking your solution.
The commands (solution's output) are given on the left, and the answers for them (solution's input) are on the right.
In each test, the special square is selected in advance and does not change during the contest.