Headshot

Time limit1sMemory limit128 MB

Problem

You have a revolver whose cylinder has $n$ chambers arranged in a circle. Each chamber is either empty or holds one round. One chamber is aligned with the barrel. When the trigger is pulled, the cylinder rotates so that the next chamber becomes aligned with the barrel, and the hammer strikes it: if that chamber holds a round, a shot is fired through the barrel; if it is empty, there is no shot but just a "click".

You are playing Russian roulette with a friend. Your friend loads rounds into some of the chambers, spins the cylinder to a uniformly random position, points the gun at their own head, and pulls the trigger. You hear a "click" and nothing else — the struck chamber was empty, so the gun did not fire.

Now it is your turn to point the gun at your head and pull the trigger. You have two options:

  • Pull the trigger right away.
  • Spin the cylinder to a uniformly random position first, then pull the trigger.

Which option gives you the greater chance of survival?

Input

The input consists of a single line containing a string of $n$ digits "0" and "1" ($2 \le n \le 100$). The string describes how the chambers are loaded: "0" is an empty chamber and "1" is a loaded one. When the cylinder rotates before a shot, the chamber immediately to the right of the current one becomes aligned with the barrel. Because the chambers lie on a circle, the first chamber of the string follows the last one. The string contains at least one "0".

Output

Print exactly one of the following words:

  • SHOOT — if pulling the trigger right away makes you less likely to be shot (more likely that the struck chamber is empty).
  • ROTATE — if spinning the cylinder to a random position before pulling the trigger makes you less likely to be shot.
  • EQUAL — if the two options give the same probability of being shot.