Problem: If you have ever interacted with a cat, you have probably noticed that they are quite particular about how to pet them. Here is an approximate map of a normal cat.

<image>

However, some cats won't tolerate this nonsense from the humans. Here is a map of a grumpy cat.

<image>

You have met a cat. Can you figure out whether it's normal or grumpy?

Interaction

This is an interactive problem. Initially you're not given any information about the cat. Instead, the cat is divided into ten areas, indexed from 0 to 9. 

In one query you can choose which area you'll pet and print the corresponding index to standard out. You will get the cat's response, as depicted on the corresponding map, via standard in. For simplicity all responses are written in lowercase.

Once you're certain what type of cat you're dealing with, output "normal" or "grumpy" to standard out.

Note

Please make sure to use the stream flushing operation after each query in order not to leave part of your output in some buffer.

Solution (in JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.TreeSet;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        b952 solver = new b952();
        solver.solve(1, in, out);
        out.close();
    }

    static class b952 {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            TreeSet<String> normal = new TreeSet<>();
            TreeSet<String> grumpy = new TreeSet<>();
            normal.add(trim("cool"));
            normal.add(trim("not bad"));
            normal.add(trim("don't touch me"));
            normal.add(trim("don't think so"));
            normal.add(trim("great"));
            grumpy.add(trim("terrible"));
            grumpy.add(trim("worse"));
            grumpy.add(trim("go die in a hole"));
            grumpy.add(trim("are you serious"));
            grumpy.add(trim("don't even"));
            grumpy.add(trim("no way"));
            for (int i = 0; i < 10; i++) {
                out.println(i);
                out.flush();
                String ans = trim(in.nextLine());
                if (normal.contains(ans) && !grumpy.contains(ans)) {
                    out.println("normal");
                    return;
                }
                if (!normal.contains(ans) && grumpy.contains(ans)) {
                    out.println("grumpy");
                    return;
                }
            }
        }

        String trim(String s) {
            StringBuilder sb = new StringBuilder();
            for (char c : s.toCharArray()) {
                if (c >= 'a' && c <= 'z') {
                    sb.append(c);
                }
            }
            return sb.toString();
        }

    }

    static class InputReader {
        private BufferedReader reader;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                return null;
            }
        }

    }
}