A revolver has a cylinder with n chambers arranged in a circle. Each chamber is either empty or holds one round. One chamber is aligned with the barrel. Pulling the trigger rotates the cylinder so that the next chamber lines up with the barrel, and the hammer strikes that chamber. If the chamber holds a round, the bullet is fired through the barrel. If the chamber is empty, there is no shot, only a click.
You are playing Russian roulette with a friend. Your friend loaded rounds into some of the chambers, spun the cylinder to align a random chamber with the barrel, put the gun to his head and pulled the trigger. You heard a click and nothing else. The chamber the hammer struck was empty, so the gun did not fire.
Now it is your turn to put the gun to your head and pull the trigger. You can choose one of two options. You can pull the trigger right away, or you can spin the cylinder to a random position first and then pull the trigger. Decide which option gives you the higher chance of survival.
The input holds several datasets. Each dataset is one line with a string of n digits 0 and 1 (2≤n≤100). The string describes how the rounds are loaded into the chambers: 0 is an empty chamber and 1 is a loaded one. When the cylinder rotates before a strike, the chamber one position to the right in the string becomes aligned with the barrel. The chambers lie on a circle, so the first chamber follows the last one. Every string holds at least one 0. The input ends at end of file.
For each dataset, print one of the following words on its own line.
SHOOT if pulling the trigger right away makes you less likely to be shot in the head, that is, more likely that the struck chamber is empty.ROTATE if spinning the cylinder before pulling the trigger makes you less likely to be shot in the head.EQUAL if the two options carry the same probability of being shot.