import std.stdio;
import std.c.stdio;
import std.range;
import std.array;
import std.functional;
import std.algorithm;
import std.conv;
import std.container;
import std.math;
import std.numeric;
import std.string;
import std.c.string;
import std.regex;
import std.typecons;
 
void main() {
    string s = readln.chomp;
    string[][] sentences = [[]];
    void Split() {
        string[] words;
        while (!s.empty) {
            if (s.startsWith("egg")) {
                words ~= "egg";
                s = s["egg".length .. $];
            } else {
                assert(s.startsWith("chicken"));
                words ~= "chicken";
                s = s["chicken".length .. $];
            }
        }
        string prev;
        foreach (word; words) {
            if (word == prev) {
                sentences ~= [[word]];
            } else {
                sentences.back ~= word;
            }
            prev = word;
        }
    }

    Split;

    ulong max_len = sentences.map!"a.length".reduce!max;
    sentences.filter!((a) => a.length == max_len).array[0].back.writeln;

    //writeln(sentences);
}