Plural Form

AtCoder
IDabc179_a
Time2000ms
Memory256MB
Difficulty
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 $S$ of a Taknese noun. Output its plural form. ## Constraints * $S$ is a string of length $1$ between $1000$, inclusive. * $S$ contains only lowercase English letters. ## Input Input is given from Standard Input in the following format: $S$ [samples]
Samples
Input #1
apple
Output #1
apples

`apple` ends with `e`, so its plural form is `apples`.
Input #2
bus
Output #2
buses

`bus` ends with `s`, so its plural form is `buses`.
Input #3
box
Output #3
boxs
API Response (JSON)
{
  "problem": {
    "name": "Plural Form",
    "description": {
      "content": "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 s",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc179_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "In the Kingdom of AtCoder, people use a language called Taknese, which uses lowercase English letters.\nIn Taknese, the plural form of a noun is spelled based on the following rules:\n\n*   If a noun's s...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments