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