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.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;

/**
 * @author ayratgdl
 * @date 01.04.18
 */
public class CF20180401B {
    public static final List<String> NORMAL_REACTIONS =
        Arrays.asList("cool", "bad", "touch", "think", "great");

    public static void main(String[] args) throws IOException {
        new CF20180401B().solve(System.in, System.out);
    }

    public void solve(InputStream input, OutputStream output) throws IOException {
        In in = new In(input);
        Out out = new Out(output);

        for (int i = 0; i <= 9; i++) {
            out.write(i).ln();
            String reaction = in.reader.readLine();

            if (reaction.equalsIgnoreCase("no")) {
                continue;
            }

            for (String normalReaction : NORMAL_REACTIONS) {
                if (reaction.contains(normalReaction)) {
                    out.write("normal").ln();
                    return;
                }
            }

            out.write("grumpy").ln();
            return;

        }
    }

    public class In {
        private BufferedReader reader;
        StringTokenizer tokener;

        public In(BufferedReader reader) {
            this.reader = reader;
        }

        public In(Reader reader) {
            this.reader = new BufferedReader(reader);
        }

        public In(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public int int1() {
            return Integer.parseInt(word());
        }

        public String word() {
            try {
                if (tokener == null || !tokener.hasMoreTokens())
                    tokener = new StringTokenizer(reader.readLine());
                return tokener.nextToken();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

        public long long1() {
            return Long.parseLong(word());
        }

        public String[] words(int n) {
            String[] result = new String[n];
            for (int i = 0; i < n; i++)
                result[i] = word();
            return result;
        }

        public int[] ints(int n) {
            int[] result = new int[n];
            for (int i = 0; i < n; i++)
                result[i] = Integer.parseInt(word());
            return result;
        }

        public long[] longs(int n) {
            long[] result = new long[n];
            for (int i = 0; i < n; i++)
                result[i] = Long.parseLong(word());
            return result;
        }
    }

    public class Out {
        private BufferedWriter writer;
        private boolean isEmptyLine = true;

        public Out(BufferedWriter writer) {
            this.writer = writer;
        }

        public Out(Writer writer) {
            this.writer = new BufferedWriter(writer);
        }

        public Out(OutputStream out) {
            this.writer = new BufferedWriter(new OutputStreamWriter(out));
        }

        private Out write(String str) {
            try {
                if (!isEmptyLine)
                    writer.write(" ");
                else
                    isEmptyLine = false;
                writer.write(str);
                return this;
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

        public Out ln() {
            try {
                writer.newLine();
                writer.flush();
                isEmptyLine = true;
                return this;
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

        public Out write(Object obj) {
            return write(obj.toString());
        }

        public Out write(int num) {
            return write(Integer.toString(num));
        }

        public Out write(long num) {
            return write(Long.toString(num));
        }

        public Out write(Object[] objs) {
            for (Object obj : objs)
                write(obj);
            return this;
        }

        public <T> Out write(Iterable<T> iter) {
            for (T obj : iter)
                write(obj);
            return this;
        }

        public Out write(int[] nums) {
            for (int num : nums)
                write(num);
            return this;
        }

        public Out write(long[] nums) {
            for (long num : nums)
                write(num);
            return this;
        }
    }
}