#include <cstdio>
#include <cstring>
using namespace std;
int main() {
char str[110];
while (gets(str) != NULL) {
int a = 0, b = 0, c = strlen(str);
for (int i = 0; i < c - 1; i++) {
if (str[i] == '0') {
a++;
if (str[i + 1] == '0') b++;
}
}
if (str[c - 1] == '0') {
a++;
if (str[0] == '0') b++;
}
double shoot = 1.0 * b / (1.0 * a);
double rotat = 1.0 * a / (1.0 * c);
if (shoot == rotat) printf("EQUAL\n");
else if (shoot > rotat) printf("SHOOT\n");
else printf("ROTATE\n");
}
return 0;
}