word = input()
if len(word)>2 and (word[len(word)-2]+word[len(word)-1] =='er' or word[len(word)-2]+word[len(word)-1] =='ly'):
word=word[:-2]
elif len(word)>3 and (word[len(word)-3]+word[len(word)-2]+word[len(word)-1] =='ing'):
word=word[:-3]
print(word)