using System;
using System.Collections.Generic;
using System.Text;

class Program
{

    public void Proc()
    {
        int count = int.Parse(Console.ReadLine());
        Player kat = new Player();
        kat.Name = "Isono";
        Player nak = new Player();
        nak.Name = "Nakajima";

        for (int i = 0; i < count; i++)
        {
            string inpt = Console.ReadLine();
            if (inpt.StartsWith("kou"))
            {
                kat.Action.Add(TurnAction.Kougeki);
            }
            else if (inpt.StartsWith("tame"))
            {
                kat.Action.Add(TurnAction.Tameru);
            }
            else
            {
                kat.Action.Add(TurnAction.Bougyo);
            }
        }
        for (int i = 0; i < count; i++)
        {
            string inpt = Console.ReadLine();
            if (inpt.StartsWith("kou"))
            {
                nak.Action.Add(TurnAction.Kougeki);
            }
            else if (inpt.StartsWith("tame"))
            {
                nak.Action.Add(TurnAction.Tameru);
            }
            else
            {
                nak.Action.Add(TurnAction.Bougyo);
            }
        }

        Player winner = null;
        for (int i = 0; i < count; i++)
        {
            winner = Player.Judge(kat, nak);
            if (winner != null)
            {
                break;
            }
        }

        string winnerName = "Hikiwake";
        if (winner != null)
        {
            winnerName = winner.Name;
        }
        Console.WriteLine(winnerName + "-kun");
        
    }

    public enum TurnAction
    {
        Kougeki,
        Bougyo,
        Tameru
    }

    public class Player
    {
        public string Name = "";
        public List<TurnAction> Action = new List<TurnAction>();
        public int Pow = 0;
        public int Round = 0;
        public void Proc()
        {
            if (Action[Round] == TurnAction.Kougeki)
            {
                Pow = 0;
            }
            else if (Action[Round] == TurnAction.Tameru)
            {
                Pow = Math.Min(Pow + 1, 5);
            }
            Round++;
        }
        public TurnAction GetAction()
        {
            return this.Action[Round];
        }
        public static Player Judge(Player p1, Player p2)
        {
            Player winner = null;
            if (p1.GetAction() == TurnAction.Kougeki && p2.GetAction() == TurnAction.Kougeki)
            {
                // ?????????????????±??????
                if (p1.Pow == p2.Pow)
                {
                    // ???????????????
                }
                else if (p1.Pow > p2.Pow)
                {
                    winner = p1;
                }
                else
                {
                    winner = p2;
                }
            }
            else if (p1.GetAction() == TurnAction.Kougeki)
            {
                if (p1.Pow <= 0)
                {
                    // p1????????????
                    winner = p2;
                }
                else if (p2.GetAction() == TurnAction.Tameru || p1.Pow >= 5)
                {
                    winner = p1;
                }
            }
            else if (p2.GetAction() == TurnAction.Kougeki)
            {
                if (p2.Pow <= 0)
                {
                    winner = p1;
                }
                else if (p1.GetAction() == TurnAction.Tameru || p2.Pow >= 5)
                {
                    winner = p2;
                }
            }
            p1.Proc();
            p2.Proc();
            return winner;
        }
    }


    static void Main(string[] args)
    {
        Program prg = new Program();
        prg.Proc();
    }
}

Measured memory_bytes: 10048