import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

/**
 * AOJ Sendame</br>
 *
 * @author ?????????????????§???
 */
public class Main{
	/*
	 * ????????°???????????¨?????????????????????
	 */
	public static void main(String[] args) throws NumberFormatException, IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		// 1?????????????????¬?????????????????????????????°
		int game_set = Integer.parseInt(br.readLine());
		// ?????????????????????????????????
		String cmd;

		// ?£??????????????????????????????????????´????????????????
		ArrayList<Pose> isono_gesture = new ArrayList<Pose>();
		for (int cnt = 0; cnt < game_set; cnt++) {
			// ????????????
			cmd = br.readLine();
			if (Pose.ACCUMULATE.getPose().equals(cmd))
				isono_gesture.add(Pose.ACCUMULATE);
			else if (Pose.DEFENCE.getPose().equals(cmd)) {
				isono_gesture.add(Pose.DEFENCE);
			} else if (Pose.ATTACK.getPose().equals(cmd)) {
				isono_gesture.add(Pose.ATTACK);
			}
		}

		// ?????¶??????????????????????????????????´????????????????
		ArrayList<Pose> nakajima_gesture = new ArrayList<Pose>();
		for (int cnt = 0; cnt < game_set; cnt++) {
			// ????????????
			cmd = br.readLine();
			if (Pose.ACCUMULATE.getPose().equals(cmd))
				nakajima_gesture.add(Pose.ACCUMULATE);
			else if (Pose.DEFENCE.getPose().equals(cmd)) {
				nakajima_gesture.add(Pose.DEFENCE);
			} else if (Pose.ATTACK.getPose().equals(cmd)) {
				nakajima_gesture.add(Pose.ATTACK);
			}
		}
		// ?????????????????????????????£?¨?
		runGame rg = new runGame(game_set);
		/*
		 * true: ??°???????????????????????? false: Hikiwake-kun?????????
		 */
		System.out.println(
				rg.PlaySendameGame(isono_gesture, nakajima_gesture) ? rg.outputWinner() : Name.HIKIWAKE.getPlayer());
	}// ?????????????????????????????????

}// ??????????????????????????????

enum Name {
	ISONO("Isono-kun"), NAKAJIMA("Nakajima-kun"), HIKIWAKE("Hikiwake-kun");
	// ??????????????????????????????????????????????????°
	private final String player;

	// ????????????????????????????????????????????????
	Name(String name) {
		this.player = name;
	}

	public String getPlayer() {
		return player;
	}

}// ?????????Name????????????

enum Pose {
	ACCUMULATE("tameru"), DEFENCE("mamoru"), ATTACK("kougekida");

	// ??????????????????????????????????????????????????°
	private final String pose;

	// ????????????????????????????????????????????????
	Pose(String gesture) {
		this.pose = gesture;
	}

	public String getPose() {
		return pose;
	}
}// ?????????Pose????????????

/**
 * ?£????????????¶???
 *
 * @author ?????????????????§???
 */
class Isono_Status {
	/**
	 * ??????????????????false????????£????????????
	 */
	private boolean HP = true;

	/**
	 * ?????????
	 */
	private int force = 0;

	/**
	 * ??????????????¶???
	 */
	private final static int max_force = 5;

	public int getMax_force() {
		return max_force;
	}

	public boolean getHP() {
		return HP;
	}

	public int getForce() {
		return force;
	}

	public void setForce(int force) {
		this.force = force;
	}

	public void setHP(boolean hP) {
		HP = hP;
	}

	// ?????¬??????????????¶???????????????
	Isono_Status() {
		this.getHP();
		this.getForce();
	}
}// Isono_Status?????????????????????

/**
 * ?????¶????????¶???
 *
 * @author ?????????????????§???
 */
class Nakajima_Status {
	/**
	 * ??????????????????false????????£????????????
	 */
	private boolean HP = true;

	/**
	 * ?????????
	 */
	private int force = 0;

	/**
	 * ??????????????¶???
	 */
	private final static int max_force = 5;

	public int getMax_force() {
		return max_force;
	}

	public boolean getHP() {
		return HP;
	}

	public int getForce() {
		return force;
	}

	public void setForce(int force) {
		this.force = force;
	}

	public void setHP(boolean hP) {
		HP = hP;
	}

	// ?????¬??????????????¶???????????????
	Nakajima_Status() {
		this.getHP();
		this.getForce();
	}
}// Nakajima_Status?????????????????????

/**
 * ????????????????????????????????????</br>
 * ?????¬??????????????????????????????????????????????????¨?????????????????£????§???????</br>
 * ?§?????????°???????????????????????????????????????????????????????????????????????????????????????
 *
 * @author ?????????????????§???
 */
class runGame {
	/**
	 * ?????????????§?????????°
	 */
	private int game_end;
	/**
	 * ??????????????°?????????</br>
	 * true:?£??????????false:?????¶???
	 */
	private boolean WhoIsWinner = true;

	// ??????????????????????????????????§?????????°????????¨
	public runGame(int game_set) {
		this.game_end = game_set;
	}

	/**
	 * ???????????????????????????
	 *
	 * @return ??????????????????
	 */
	public String outputWinner() {
		return (this.WhoIsWinner) ? Name.ISONO.getPlayer() : Name.NAKAJIMA.getPlayer();
	}// outputWinner????????????????????????

	/**
	 * ???????????????????????????????????????</br>
	 * ????????????????????????????????????????????????</br>
	 * ??????????????????????????????????????????
	 *
	 * @param isono_gesture
	 *            ?£???????????????????
	 * @param nakajima_gesture
	 *            ?????¶???????????????
	 * @return ??????????????????????????????????????????
	 */
	public boolean PlaySendameGame(ArrayList<Pose> isono_gesture, ArrayList<Pose> nakajima_gesture) {
		// ????????¬??????????????¶???????????????
		Isono_Status is_stat = new Isono_Status();
		Nakajima_Status na_stat = new Nakajima_Status();
		// ?£???????
		Isono_Status[] isono = { is_stat };
		// ?????¶???
		Nakajima_Status[] nakajima = { na_stat };

		for (int cnt = 0; cnt < this.game_end; cnt++) {

			// ????????????????????\?????????????????????????????????
			if (!isono[0].getHP() || !nakajima[0].getHP()) {
				break;
			}
			// ?????¬???????????????????????§??????????????????
			switch (isono_gesture.get(cnt)) {
			case ACCUMULATE:
				switch (nakajima_gesture.get(cnt)) {
				case ACCUMULATE:
					// ???????????¶????????§????????????????????????
					if (isono[0].getForce() < is_stat.getMax_force()) {
						isono[0].setForce(isono[0].getForce() + 1);
					}
					if (nakajima[0].getForce() < na_stat.getMax_force()) {
						nakajima[0].setForce(nakajima[0].getForce() + 1);
					}
					break;
				case DEFENCE:
					// ?????¶???????????´??????
					if (isono[0].getForce() < is_stat.getMax_force())
						isono[0].setForce(isono[0].getForce() + 1);
					break;
				case ATTACK:
					if (nakajima[0].getForce() == 0) {
						// ????????????
						nakajima[0].setHP(false);
					} else {
						// ?????¶????????????
						isono[0].setHP(false);
						this.WhoIsWinner = false;
					}
					// ????????????????????????
					nakajima[0].setForce(0);

					if (isono[0].getForce() < isono[0].getMax_force()) {
						isono[0].setForce(isono[0].getForce() + 1);
					}
					break;
				}
				break;
			case DEFENCE:
				switch (nakajima_gesture.get(cnt)) {
				case ACCUMULATE:
					// ?£???????????????´??????
					if (nakajima[0].getForce() < na_stat.getMax_force())
						nakajima[0].setForce(nakajima[0].getForce() + 1);
					break;
				case DEFENCE:
					// ?????????????????´????????§?????????????¶????
					break;
				case ATTACK:
					if (nakajima[0].getForce() == na_stat.getMax_force()) {
						// ?????¶????????????
						isono[0].setHP(false);
						this.WhoIsWinner = false;
					} else if (nakajima[0].getForce() == 0) {
						// ????????????
						nakajima[0].setHP(false);
					}
					// ????????????????????????
					nakajima[0].setForce(0);
					break;
				}
				break;
			case ATTACK:
				switch (nakajima_gesture.get(cnt)) {
				case ACCUMULATE:
					if (isono[0].getForce() == 0) {
						// ????????????
						isono[0].setHP(false);
						this.WhoIsWinner = false;
					} else {
						// ?£????????????????
						nakajima[0].setHP(false);
					}
					// ????????????????????????
					isono[0].setForce(0);

					if (nakajima[0].getForce() < nakajima[0].getMax_force()) {
						nakajima[0].setForce(nakajima[0].getForce() + 1);
					}

					break;
				case DEFENCE:
					// ?£???????????????????????????§???????????????
					if (isono[0].getForce() == is_stat.getMax_force()) {
						// ?£????????????????
						nakajima[0].setHP(false);
					} else if (isono[0].getForce() == 0) {
						// ????????????
						isono[0].setHP(false);
						this.WhoIsWinner = false;
					}
					// ????????\????????????
					isono[0].setForce(0);
					break;
				case ATTACK:
					// ??????????????????????????????????????????????????????????????????
					if (isono[0].getForce() > nakajima[0].getForce()) {
						// ?£????????????????
						nakajima[0].setHP(false);
					} else if (isono[0].getForce() < nakajima[0].getForce()) {
						// ?????¶????????????
						isono[0].setHP(false);
						this.WhoIsWinner = false;
					}
					// ????????\????????????
					nakajima[0].setForce(0);
					isono[0].setForce(0);
					break;
				}
				break;
			}
		}
		// ?????????????????????
		if (isono[0].getHP() && nakajima[0].getHP()) {
			return false;
		}
		// ????????????
		return true;
	}// PlaySendameGame????????????????????????
}// runGame?????????????????????

Measured memory_bytes: 24512