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 CPP):

Solution:
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
void solveB() {
  string s;
  for (int i = 0; i < 10; ++i) {
    cout << i << endl;
    string tmp_str;
    getline(cin, tmp_str);
    s = "";
    for (char c : tmp_str) {
      s.push_back(tolower(c));
    }
    if (s.find("cool") != -1 || s.find("great") != -1 ||
        s.find("think so") != -1 || s.find("touch me") != -1 ||
        s.find("not bad") != -1) {
      cout << "normal" << endl;
      return;
    }
    if (s == "no way" || s == "are you serious?" || s == "go die in a hole" ||
        s == "don't even" || s == "worse" || s == "terrible") {
      cout << "grumpy" << endl;
      return;
    }
  }
  cout << "grumpy" << endl;
}
void solveD() {
  srand(time(NULL));
  int n = rand() % 36;
  cout << n << endl;
}
void solveE() {
  int n;
  cin >> n;
  string s;
  int answer = 0;
  for (int i = 0; i < n; ++i) {
    cin >> s;
    for (char c : s) {
      if (c == 'm') {
        ++answer;
      }
    }
    cin >> s;
  }
  cout << answer << endl;
}
void check_arr(vector<int>& v) {
  bool q = true;
  while (q) {
    q = false;
    for (int i = 1; i < v.size(); ++i) {
      while (v[i] - v[i - 1] > 1) {
        --v[i];
        ++v[i - 1];
      }
      while (v[i - 1] - v[i] > 1) {
        --v[i - 1];
        ++v[i];
      }
    }
  }
  return;
}
void solveC() {
  int n;
  cin >> n;
  vector<int> v(n, 0);
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
  }
  vector<int> sorted(v);
  sort(sorted.begin(), sorted.end());
  vector<int> answer;
  while (v.size()) {
    check_arr(v);
    int ind = 0;
    for (int i = 0; i < v.size(); ++i) {
      if (v[i] > v[ind]) {
        ind = i;
      }
    }
    answer.push_back(v[ind]);
    v.erase(v.begin() + ind);
    check_arr(v);
  }
  reverse(answer.begin(), answer.end());
  for (int i = 0; i < answer.size(); ++i) {
    if (answer[i] != sorted[i]) {
      cout << "NO" << endl;
      return;
    }
  }
  cout << "YES" << endl;
  return;
}
int main() {
  solveB();
  return 0;
}