# open(in, "input.txt");
# open(out, ">output.txt");
# $_=<in>;
# local $/;
# $_=<in>;
$_=<STDIN>;
$_=<STDIN>;
s/(ch|[xso])$/$1es/gm;
s/y$/ies/gm;
s/fe?$/ves/gm;
s/(?<!s)$/s/gm;
# print out $_;
# close in;
# close out;
IwlvcGVuKGluLCAiaW5wdXQudHh0Iik7CiMJb3BlbihvdXQsICI+b3V0cHV0LnR4dCIpOwoJCiMJJF89PGluPjsKIwlsb2NhbCAkLzsKIwkkXz08aW4+OwoKCSRfPTxTVERJTj47Cglsb2NhbCAkLzsKCSRfPTxTVERJTj47CgkKCXMvKGNofFt4c29dKSQvJDFlcy9nbTsKCXMveSQvaWVzL2dtOwoJcy9mZT8kL3Zlcy9nbTsKCXMvKD88IXMpJC9zL2dtOwoJCiMJcHJpbnQgb3V0ICRfOwoJcHJpbnQgJF87CgkKIwljbG9zZSBpbjsKIwljbG9zZSBvdXQ7