def LetterCountI(str):
    al = str.split()
    alp = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
    le = []

    for index, word in enumerate(al):
        for letter in alp:
            if word.count(letter) > 1:
                le.append(index)
    if not le:
        return -1

    return al[le[0]]

# keep this function call here  
# to see how to enter arguments in Python scroll down
print LetterCountI(raw_input())
"""
Have the function LetterCountI(str)
take the str parameter being passed
and return the first word with the greatest
number of repeated letters.
For example: "Today, is the greatest day ever!"
should return greatest because it has 2 e's
(and 2 t's) and it comes before ever which also
has 2 e's. If there are no words with repeating
letters return -1. Words will be separated by spaces. 
"""

