A - Plural Form Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点 : 100100

問題文

AtCoder 王国では、英小文字を用いる高橋語という言語が使われています。

高橋語では、名詞の複数形は次のルールで綴られます。

  • 単数形の末尾が s 以外なら、単数形の末尾に s をつける
  • 単数形の末尾が s なら、単数形の末尾に es をつける

高橋語の名詞の単数形 SS が与えられるので、複数形を出力してください。

制約

  • SS は長さ 11 以上 10001000 以下の文字列
  • SS は英小文字のみを含む

入力

入力は以下の形式で標準入力から与えられる。

SS

出力

与えられた高橋語の複数形を出力せよ。


入力例 1Copy

Copy
apple

出力例 1Copy

Copy
apples

apple の末尾は e なので、複数形は apples になります。


入力例 2Copy

Copy
bus

出力例 2Copy

Copy
buses

bus の末尾は s なので、複数形は buses になります。


入力例 3Copy

Copy
box

出力例 3Copy

Copy
boxs

Score : 100100 points

Problem Statement

In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.

In Taknese, the plural form of a noun is spelled based on the following rules:

  • If a noun's singular form does not end with s, append s to the end of the singular form.
  • If a noun's singular form ends with s, append es to the end of the singular form.

You are given the singular form SS of a Taknese noun. Output its plural form.

Constraints

  • SS is a string of length 11 between 10001000, inclusive.
  • SS contains only lowercase English letters.

Input

Input is given from Standard Input in the following format:

SS

Output

Print the plural form of the given Taknese word.


Sample Input 1Copy

Copy
apple

Sample Output 1Copy

Copy
apples

apple ends with e, so its plural form is apples.


Sample Input 2Copy

Copy
bus

Sample Output 2Copy

Copy
buses

bus ends with s, so its plural form is buses.


Sample Input 3Copy

Copy
box

Sample Output 3Copy

Copy
boxs


2025-04-26 (Sat)
03:19:04 +00:00