// clang-format off

#include <bits/stdc++.h>

#define int long long int
#define main signed main()
#define bye return 0
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define each(p, v) for (auto p = (v).begin(); p != (v).end(); p++)
#define all(v) (v).begin(), (v).end()
#define prec(n) fixed << setprecision(n)
#define dump(x) cerr << "(L" << __LINE__ << ") " << #x << " = " << (x) << endl
#define clr(x, a) memset(x, a, sizeof(x))

#define sum(v) accumulate(all(v), 0)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define odd(n) ((n) % 2)
#define even(n) (!odd(n))

#define INF 1000000000
#define MOD 1000000007
#define PI acos(-1)

#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define vi vector<int>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>

using namespace std;

// clang-format on

int K;
int ia = 0, na = 0;
int result = 0;

int _f(string I, string N, int *_ia, int *_na) {
  if (I == "kougekida" && N == "kougekida") {
    if (*_ia > *_na) {
      return 1;
    }
    if (*_ia < *_na) {
      return -1;
    }
    *_ia = *_na = 0;
    return 0;
  }
  if (I == "kougekida" && N == "mamoru") {
    if (*_ia == 0) {
      return -1;
    }
    if (*_ia == 5) {
      return 1;
    }
    *_ia = 0;
    return 0;
  }
  if (I == "kougekida" && N == "tameru") {
    return *_ia == 0 ? -1 : 1;
  }
  if (I == "mamoru" && N == "mamoru") {
    return 0;
  }
  if (I == "mamoru" && N == "tameru") {
    *_na = min<int>(5, *_na + 1);
    return 0;
  }
  if (I == "tameru" && N == "tameru") {
    *_ia = min<int>(5, *_ia + 1);
    *_na = min<int>(5, *_na + 1);
    return 0;
  }
  return -_f(N, I, _na, _ia); // テ」ツ?セテ」ツ?陛」ツ?凝」ツ?ョテ・ツ?催・ツクツーテ」ツ?愿」ツ?愿」ツ?愿ッツシツ?ッツシツ?ッツシツ?
}

void f(string I, string N) {
  if (result == 0) {
    result = _f(I, N, &ia, &na);
  }
}

main {
  cin >> K;
  string I[K], N[K];
  rep(i, K) cin >> I[i];
  rep(i, K) cin >> N[i];
  rep(i, K) f(I[i], N[i]);
  cout << (result == 1 ? "Isono-kun"
                       : result == -1 ? "Nakajima-kun" : "Hikiwake-kun")
       << endl;
  bye;
}