1 import java
.io
.FileReader
;
2 import java
.io
.IOException
;
3 import java
.io
.PrintWriter
;
4 import java
.util
.ArrayList
;
5 import java
.util
.HashMap
;
6 import java
.util
.Scanner
;
8 public class headshot_mb
implements Runnable
{
10 private PrintWriter out
;
12 public static void main(String
[] args
) {
13 new Thread(new headshot_mb()).start();
18 in
= new Scanner(new FileReader("headshot.in"));
19 out
= new PrintWriter("headshot.out");
25 } catch (IOException e
) {
30 private void solve() {
31 final ArrayList
<Integer
> chambers
= new ArrayList
<Integer
>();
34 final String line
= in
.nextLine();
35 for (int i
= 0; i
< line
.length(); i
++) {
36 final int chamber
= line
.charAt(i
) - '0';
40 chambers
.add(chamber
);
45 final int numEmpty
= total
- numLoaded
;
46 int numLoadedAfterEmpty
= 0;
47 for (int i
= 0; i
< chambers
.size(); i
++) {
48 if (chambers
.get(i
) == 0 && chambers
.get((i
+ 1) % chambers
.size()) == 1) {
49 numLoadedAfterEmpty
++;
53 final double probRotate
= (double) numLoaded
/ total
;
54 final double probShoot
= (double) numLoadedAfterEmpty
/ numEmpty
;
56 if (Math
.abs(probRotate
- probShoot
) < 1e-6) {
58 } else if (probRotate
< probShoot
) {
59 out
.println("ROTATE");