(defn main []
  (let [s (read-line)
        word (reverse s)]
    (if (= (first word) \s)
      (println (clojure.string/join (concat s "es")))
      (println (clojure.string/join (concat s "s"))))))

(main)
    