#Kattis: Triple Texting
from collections import Counter

triple = input()
length = len(triple)//3

words = [triple[0:length], triple[length:length*2], triple[length*2:]]
print(Counter(words).most_common()[0][0])

3082283ca4b033821db1ff0c949e8e3b19e01b99
<mask token>

<mask token>
print(Counter(words).most_common()[0][0])

<mask token>
triple = input()
length = len(triple) // 3
words = [triple[0:length], triple[length:length * 2], triple[length * 2:]]
print(Counter(words).most_common()[0][0])

from collections import Counter
triple = input()
length = len(triple) // 3
words = [triple[0:length], triple[length:length * 2], triple[length * 2:]]
print(Counter(words).most_common()[0][0])

#Kattis: Triple Texting
from collections import Counter

triple = input()
length = len(triple)//3

words = [triple[0:length], triple[length:length*2], triple[length*2:]]
print(Counter(words).most_common()[0][0])
