// AOJ Sendame
// internship ?????°?????????

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		
		//????????????????????°?????´??°??\???
		int countAction = sc.nextInt();
		
		String[] aryIsonokun = new String[countAction];
		String[] aryNakajimakun = new String[countAction];
		
		for( int i = 0 ; i < aryIsonokun.length ; i++ ){
			// tameru mamoru kougekida ???????¨?????????????????????\????????????
			aryIsonokun[i] = sc.next();
		}
		
		for( int i = 0 ; i < aryNakajimakun.length ; i++ ){
			// tameru mamoru kougekida ???????¨?????????????????????\????????????
			aryNakajimakun[i] = sc.next();
		}
		
		//Sendame????????????????????????
		Sendame insSendame = new Sendame( aryIsonokun , aryNakajimakun );
		
	}
}

/**
 * Sendame?????????
 * @author User
 *
 */
class Sendame{
	
	private String[] aryPlayer1;
	private String[] aryPlayer2;
	
	private String playerName1 = "Isono-kun";
	private int powerPlayer1 = 0;
	
	private String playerName2 = "Nakajima-kun";
	private int powerPlayer2 = 0;
	
	private String winner = "Hikiwake-kun";
	
	/**
	 * ?????????????????????
	 * @param aryPlayer1 tameru mamoru kougekida ????????????????????\??£?????????
	 * @param aryPlayer2 tameru mamoru kougekida ????????????????????\??£?????????
	 */
	public Sendame(String[] aryPlayer1 , String[] aryPlayer2){
		
		this.aryPlayer1 = aryPlayer1;
		this.aryPlayer2 = aryPlayer2;
		
		for( int i = 0 ; i < aryPlayer1.length ; i++ ){
			
			judgeBattle( aryPlayer1[i],aryPlayer2[i]);
			
			if( winner != "Hikiwake-kun"){
				break;
			}
		}
		
		System.out.println(winner);
		
	}
	
	/**
	 * 2???????????¬????????????????????????
	 * @param actionPlayer1 player1?????¢????????§???
	 * @param actionPlayer2 player2?????¢????????§???
	 */
	public void judgeBattle( String actionPlayer1 , String actionPlayer2 ){
		
		//player1??? kougekida ?????£?????´??????player2??? kougekida mamoru tameru ???3????????????
		if( actionPlayer1.equals("kougekida") ){
			
			if( actionPlayer2.equals("kougekida" )){
				
				if( powerPlayer1 == 0 ){
					
					if( powerPlayer2 == 0 ){
						//?????????????????????
					}else if( powerPlayer2 >= 1 ){
						winner = playerName2;
					}
					
				}else if( powerPlayer1 >= 1 ){
					
					if( powerPlayer2 == 0 ){
						winner = playerName1;
					}else if( powerPlayer1 == powerPlayer2 ){
						//?????????????????????
					}else if( powerPlayer1 > powerPlayer2 ){
						winner = playerName1;
					}else if( powerPlayer1 < powerPlayer2 ){
						winner = playerName2;
					}
					
				}
				//?????????????????????0???
				powerPlayer2 = 0;
			
			
			}else if( actionPlayer2.equals("tameru" ) ){
				
				//???????????¶???5
				if( powerPlayer2 < 5){
					powerPlayer2++;
				}
				
				if( powerPlayer1 == 0 ){
					winner = playerName2;
				}else if( powerPlayer1 >= 1 ){
					winner = playerName1;
				}
				
			}else if( actionPlayer2.equals("mamoru" ) ){
				
				if( powerPlayer1 == 0 ){
					winner = playerName2;
				}else if( powerPlayer1 == 5 ){
					winner = playerName1;
				}
				
			}
			
			//?????????????????????0???
			powerPlayer1 = 0;
			
		//player1??? mamoru ?????£?????´??????player2??? kougekida mamoru tameru ???3????????????	
		}else if( actionPlayer1.equals("mamoru") ){
			
			if( actionPlayer2.equals("kougekida" )){
				
				if( powerPlayer2 == 0){
					winner = playerName1;
				}else if( powerPlayer2 == 5 ){
					winner = playerName2;
				}
				
				//?????????????????????0???
				powerPlayer2 = 0;
				
			}else if( actionPlayer2.equals("tameru" ) ){
				
				//???????????¶???5
				if( powerPlayer2 < 5){
					powerPlayer2++;
				}
				
			}else if( actionPlayer2.equals("mamoru" ) ){
				//???????????????
			}
		
		//player1??? tameru ?????£?????´??????player2??? kougekida mamoru tameru ???3????????????
		}else if( actionPlayer1.equals("tameru") ){
			
			//???????????¶???5
			if( powerPlayer1 < 5 ){
				powerPlayer1++;
			}
			
			if( actionPlayer2.equals("kougekida" )){
				
				if( powerPlayer2 == 0){
					winner = playerName1;
				}else if( powerPlayer2 >= 1 ){
					winner = playerName2;
				}
				
				//?????????????????????0???
				powerPlayer2 = 0;
				
			}else if( actionPlayer2.equals("tameru" ) ){
				
				//???????????¶???5
				if( powerPlayer2 < 5){
					powerPlayer2++;
				}
				
			}else if( actionPlayer2.equals("mamoru" ) ){
				//???????????????
			}
		}
	}
}

Measured memory_bytes: 26452