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