/*
 * A.cc: 
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>

using namespace std;

/* constant */

const int MAX_N = 100;
const int MAX_P = 5;
const string ans[] = { "Isono-kun", "Nakajima-kun", "Hikiwake-kun" };

enum { H_DEF, H_STO, H_ATT };

/* typedef */

/* global variables */

int hs[2][MAX_N], pws[2];

/* subroutines */

inline int s2h(string &s) {
  if (s == "mamoru") return H_DEF;
  if (s == "tameru") return H_STO;
  return H_ATT;
}

/* main */

int main() {
  int n;
  cin >> n;

  for (int i = 0; i < 2; i++)
    for (int j = 0; j < n; j++) {
      string s;
      cin >> s;
      hs[i][j] = s2h(s);
    }

  int win = 2;
  for (int i = 0; i < n; i++) {
    //printf("%d: %d(%d) - %d(%d)\n", i, hs[0][i], pws[0], hs[1][i], pws[1]);

    int atc[2], def[2];
    for (int j = 0; j < 2; j++)
      switch (hs[j][i]) {
      case H_ATT:
	if (pws[j] == 0) atc[j] = def[j] = -1;
	else atc[j] = pws[j], def[j] = 0;
	pws[j] = 0;
	break;
      case H_STO:
	atc[j] = def[j] = 0;
	if (pws[j] < MAX_P) pws[j]++;
	break;
      case H_DEF:
	atc[j] = 0, def[j] = MAX_P - 1;
	break;
      }

    if (atc[0] > def[1] && atc[1] > def[0]) {
      if (atc[0] > atc[1]) { win = 0; break; }
      if (atc[1] > atc[0]) { win = 1; break; }
    }
    else {
      if (atc[0] > def[1]) { win = 0; break; }
      if (atc[1] > def[0]) { win = 1; break; }
    }
  }

  cout << ans[win] << endl;
  return 0;
}