s = eval(input())

a = s + ('es' if s[-1] == 's' else 's')

print(a)
s=eval(input())

print((s+'es'[s[-1]!='s':]))
s = eval(input())
a = s + ("es" if s[-1] == "s" else "s")
print(a)

s = eval(input())
print((s + "es"[s[-1] != "s" :]))

-a = s + ("es" if s[-1] == "s" else "s") -print(a) +print((s + "es"[s[-1] != "s" :]))