a = eval(input())

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

else :print((a+"s"))
a = eval(input())

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

a = eval(input())
print((a + "e" * (a[-1] == "s") + "s"))

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