Space Telescope#528

Space Telescope

1 second
64 megabytes
Very easy

You have a special rotating telescope with observation positions. The positions are arranged in a circle on a rotating mechanism. Each position can show either an empty area of space or a bright star. When you press the rotation button, the mechanism rotates, aligning the next position with the viewing window. Since positions are arranged in a circle, the first position follows after the last in the sequence.

You know the sky configuration — which positions contain stars and which are empty. Your friend sets the telescope to a random empty position, then rotates the mechanism once. Now you are at the position next to an empty one, but you don't know which position it is.

Your goal is to photograph a star. You have a choice:

Which option gives you better chances of photographing a star?

Input

The input consists of a single line containing a string of digits and (2 \leq n \leq 100). This string describes the configuration of the telescope positions. — empty area of space, — position with a star. When the mechanism rotates, the next position to the right aligns with the viewing window. Since positions are arranged in a circle, the first position follows after the last in the sequence. The string contains at least one .

Output

Output one of the following words (without quotes):

  • SHOOT — if it's better to photograph immediately (higher probability of photographing a star)

  • ROTATE — if it's better to rotate a random number of times (higher probability of photographing a star)

  • EQUAL — if both options give equal probability of photographing a star

Examples

Example 1

Loading
Loading