1 import java
.io
.BufferedReader
;
2 import java
.io
.FileReader
;
3 import java
.io
.PrintWriter
;
4 import java
.io
.IOException
;
5 import java
.util
.StringTokenizer
;
7 public class headshot_petr
implements Runnable
{
8 private void solve() throws IOException
{
9 String s
= nextToken();
12 for (int i
= 0; i
< n
; ++i
) {
13 a
[i
] = s
.charAt(i
) - '0';
19 for (int i
= 0; i
< n
; ++i
) {
22 if (a
[(i
+ 1) % n
] == 0) {
29 if (p1
/ q1
> p2
/ q2
)
30 writer
.println("SHOOT");
31 else if (p1
/ q1
< p2
/ q2
)
32 writer
.println("ROTATE");
34 writer
.println("EQUAL");
38 public static void main(String
[] args
) throws InterruptedException
{
39 Thread thread
= new Thread(new headshot_petr());
44 static final String TASK_ID
= "headshot";
45 static final String IN_FILE
= TASK_ID
+ ".in";
46 static final String OUT_FILE
= TASK_ID
+ ".out";
47 BufferedReader reader
;
48 StringTokenizer tokenizer
;
53 reader
= new BufferedReader(new FileReader(IN_FILE
));
55 writer
= new PrintWriter(OUT_FILE
);
59 } catch (Exception e
) {
65 int nextInt() throws IOException
{
66 return Integer
.parseInt(nextToken());
69 long nextLong() throws IOException
{
70 return Long
.parseLong(nextToken());
73 double nextDouble() throws IOException
{
74 return Double
.parseDouble(nextToken());
77 String
nextToken() throws IOException
{
78 while (tokenizer
== null || !tokenizer
.hasMoreTokens()) {
79 tokenizer
= new StringTokenizer(reader
.readLine());
81 return tokenizer
.nextToken();