line = gets.chomp
line.gsub!(/egg/,"e")
line.gsub!(/chicken/,"c")
line.gsub!(/ee/,"e e")
line.gsub!(/cc/,"c c")
nl = line.split
max = 0
ans =""
nl.each{|w|
  if max<w.size
    ans = w
    max = w.size
  end
}
if ans[max-1]=="c"
  puts "chicken"
else
  puts "egg"
end