S = eval(input())



if S.endswith('s'):

  S = S + 'es'

else:

  S = S + 's'



print(S)

S = eval(input())



if S[-1] == "s":

  print((S + "es"))

else:

  print((S + "s"))

S = eval(input())
if S.endswith("s"):
    S = S + "es"
else:
    S = S + "s"
print(S)

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

-if S.endswith("s"): -    S = S + "es" +if S[-1] == "s": +    print((S + "es")) -    S = S + "s" -print(S) +    print((S + "s"))