#!/usr/bin/env python3

# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.

import sys

if __name__ == "__main__":

    while True:
        linha = raw_input()
    
        if linha in '0':
            break
    
        jogadas = int(linha);

        jilo = 0
        ferrugem = 0

        for x in range(0, jogadas):
            linha = raw_input()
            temp = linha.split(" ")
            if temp[0]=="lona":
                jm = 0
            else:
                jm = len(temp[0])
            
            if temp[1]=="lona":
                fm = 0;
            else:
                fm = len(temp[1])

            if temp[2]=="lona":
                ja = 0
            else:
                ja = int(temp[2])

            if temp[3]=="lona":
                fa = 0
            else:
                fa = int(temp[3])
                
            if ja == jm + fm:
                jilo +=1 ;
                
            if fa == jm + fm:
                ferrugem += 1
            
        if jilo > ferrugem:
            print("Jilo")
        elif ferrugem > jilo:
            print("Ferrugem")
        else:
            print("Empate");
            
    sys.exit()
