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.*;
import java.util.*;
import java.math.*;
 
public class main {
    public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    public static PrintWriter pw = new PrintWriter(System.out);
    public static String line;
    public static StringTokenizer st;
    public static ArrayList<ArrayList<Integer>> adjList;
    public static int[] dx = {-1, 0, 1, 0, -1, 1, 1, -1};
    public static int[] dy = {0, 1, 0, -1, 1, 1, -1, -1};
    public static int INF = 0x3f3f3f3f;
    public static int MOD = 1000000007;

    public static void main(String[] args) throws Exception {
        HashSet<String> cool = new HashSet<String>();
        cool.add("don't think so");
        cool.add("don't touch me");
        cool.add("great");
        cool.add("not bad");
        cool.add("cool");

        for(int i = 0; i < 9; i++) {
            System.out.println(i);
            System.out.flush();

            String res = br.readLine();
            if (!res.equals("no")) {
                System.out.println(cool.contains(res) ? "normal" : "grumpy");
                System.out.flush();
                break;
            }
        }
        
        pw.close(); 
        br.close();
    }
}

class Pair implements Comparable<Pair>{
    public int x, y;
 
    Pair(int _x, int _y){
        x = _x;
        y = _y;
    }
 
    public String toString(){
        return x + "," + y;
    }
 
    public int compareTo(Pair p){
        if(x != p.x) return x < p.x ? 1 : -1;
        else if(y != p.y) return y < p.y ? -1 : 1;
        return 0;
    }
}