fork download
  1. # open(in, "input.txt");
  2. # open(out, ">output.txt");
  3.  
  4. # $_=<in>;
  5. # local $/;
  6. # $_=<in>;
  7.  
  8. $_=<STDIN>;
  9. local $/;
  10. $_=<STDIN>;
  11.  
  12. s/(ch|[xso])$/$1es/gm;
  13. s/y$/ies/gm;
  14. s/fe?$/ves/gm;
  15. s/(?<!s)$/s/gm;
  16.  
  17. # print out $_;
  18. print $_;
  19.  
  20. # close in;
  21. # close out;
Success #stdin #stdout 0s 3608KB
stdin
3
contest
hero
lady
stdout
contests
heroes
ladies