s=gets
res=0
c=0
f=false
s.length.times do|i|
    if s[i].ord==65367
        next if !f
        c +=1
    else
        f=true
        res=c if c > res
        c=0
    end
end
f=false
res=c if c > res
c=0
s.length.times do|i|
    if s[i].ord==65367
        next if !f
        c +=1
    else
        f=true
        next if c==0
        if res == c
            j=1
            next if i-j <= 0
            while i-j>=0&&s[i-j].ord==65367
                j+=1
            end
            next if i-j <= 0
            while i-j>=0&&s[i-j].ord!=65367
                j +=1
            end
            j-=1
            while s[i-j].ord!=65367
                print s[i-j]
                j-=1
            end
            puts
        end
        c=0
    end
end
exit
i=s.length
if res == c && c >1
            j=1
            exit if i-j <= 0
            while i-j>=0&&s[i-j].ord==65367
                j+=1
            end
            exit if i-j <= 0
            while i-j>=0&&s[i-j].ord!=65367
                j +=1
            end
            j-=1
            while s[i-j].ord!=65367
                print s[i-j]
                j-=1
            end
            puts
        end