Problem:


Score : 100 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 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

Output

Print the plural form of the given Taknese word.

Sample Input 1

apple

Sample Output 1

apples

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

Sample Input 2

bus

Sample Output 2

buses

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

Sample Input 3

box

Sample Output 3

boxs



Sample input:
apple


Sample output:
apples

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S = readline().strip()

    if S[-1] != 's':
        print(S + 's')
    else:
        print(S + 'es')

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
'''
Created on 2020/09/19

@author: harurun
'''
def if_3(t1,ans1,t2,ans2,ans3):print(ans1 if t1 else ans2 if t2 else ans3)
def if_2(t1,ans1,ans2):print(ans1 if t1 else ans2)
def YN(t):print("YES" if t else "NO")
def yn(t):print("yes" if t else "no")
def Yn(t):print("Yes" if t else "No")
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  S=pin()[:-1]
  if S[-1]=="s":
    print(S+"es")
  else:
    print(S+"s")
  return
main()

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

S = s()
if S[-1] == 's':
    print(S+'es')
else:
    print(S+'s')

Submission status: Accepted

Solution code:
string = input().strip()
if string[-1] == "s":
    print(string + "es")
else:
    print(string + "s")

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque, defaultdict
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations,product#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
from functools import reduce,lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal
from argparse import ArgumentParser

args=ArgumentParser()
args.add_argument('-loc', '--local', type=bool,default=False)
LOCAL=args.parse_args().local

def input(): 
    x=sys.stdin.readline(); 
    if x[-1]=="\n": 
        return x.rstrip() 
    return x
    
def printe(*x):_=print("## ",*x,file=sys.stderr) if LOCAL else 0
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def binr(x): return bin(x)[2:]
def bitcount(x): #xは64bit整数
    x= x - ((x >> 1) & 0x5555555555555555)
    x= (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x= (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f 
    x+= (x >> 8); x+= (x >> 16); x+= (x >> 32) 
    return x & 0x7f

def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    #N = int(input())
    #N, K = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列


    s=input()
    if (s[-1]=="s"):
        print(s+"es")
    else:
        print(s+"s")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()

if s[-1] == 's':
   print(s+'es')
else:
   print(s+'s')

Submission status: Accepted

Solution code:
# input()
# int(input())
# map(int, input().split())
# list(map(int, input().split()))
# list(map(int, list(input()))) # スペースがない数字リストを読み込み
import math
import fractions
import sys
import bisect
import heapq  # 優先度付きキュー(最小値取り出し)
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


# a^n
def power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod


# n*(n-1)*...*(l+1)*l
def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a

# Union Find
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# 約数生成
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

inf = 10 ** 18
mod = 10 ** 9 + 7

s = sr()
if s[-1] == 's':
    print('{}es'.format(s))
else:
    print('{}s'.format(s))

Submission status: Accepted

Solution code:
s = input()
if s[-1] == 's':
    print(s + "es")
else:
    print(s + "s")

Submission status: Accepted

Solution code:
S=input()

if S[-1]=='s':
  print(S+'es')
else:
  print(S+'s')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

s = input().rstrip()
if s[-1] == "s":
    print(s + "es")
else:
    print(s + "s")

Submission status: Accepted

Solution code:
S = input().strip()

if S[-1] == "s":
	print(S + "es")
else:
	print(S + "s")

Submission status: Accepted

Solution code:
a = input()

if a[-1] == "s":
    print(a + "es")
else:
    print(a + "s")

Submission status: Accepted

Solution code:
S = list(input())

if S[-1] == "s":
  S.append("es")
else:
  S.append("s")

print("".join(list(map(str, S))))

Submission status: Accepted

Solution code:
s=input()
if s[-1]=="s":
    print(s+"es")
else:
    print(s+"s")

Submission status: Accepted

Solution code:
#import sys
MOD = 10 ** 9 + 7
INFI = 10**10
#input = sys.stdin.readline
import math
from collections import deque
import itertools
import heapq
#import bisect
from fractions import Fraction
import copy
from functools import lru_cache
from collections import defaultdict
import pprint

#oo=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
# ko=list("abcdefghijklmnopqrstuvwxyz")

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

#    h,w,a,b = map(int, input().split())
#    c = [[0 for j in range(n)] for i in range(n)]

def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)

def soinsubunkai(n):
    a = []
    i = 1
    while i*i <= n:
        if n % i == 0 and i!=1:
            a.append(i)
            n=n//i

        if n% i !=0 or i==1:
            i += 1
    nokori=[n]
    return a + nokori

def soinsubunkai_e(n,m): #高速素因数分解 m[n]=nを割ることの出来る最小の素数
    a = set()
    i = 1
    while n>1:
        a.add(m[n])
        n=n//m[n]
    nokori=n
    a.add(nokori)
    return a

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]


def era(n): #b[n]=nを割ることの出来る最小の素数　の配列を生成　エラトステネスの篩
    b=[i for i in range(n+1)]
    for i in range(2,int(math.sqrt(n)+10)):
        j=1
        temp=i*j
        while temp<=n:
            b[temp]=min(i,b[temp])
            temp+=i
    return b


def main():
    #l,r,d=map(int,input().split())
    s=input()
    a=s[-1]
    if a=="s":
        s=s+"es"
    else:
        s=s+"s"
    print(s)





if __name__ == "__main__":

    main()

Submission status: Accepted

Solution code:
def solve():
    S = input()
    if S[-1] == 's':
        print(S + 'es')
    else:
        print(S + 's')

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:

url = "https://atcoder.jp//contests/abc178/tasks/abc178_a"

def main():
    s = input()
    print(s + 's') if s[-1] != 's' else print(s + 'es')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

S=input().strip()

if S[-1]=="s":
    S+="es"
else:
    S+="s"

print(S)

Submission status: Accepted

Solution code:
def N():
    return int(input())
def L():
    return list(map(int,input().split()))
def NL(n):
    return [list(map(int,input().split())) for i in range(n)]
mod = pow(10,9)+7
#import numpy

s =input()
l = len(s)
if s[l-1] == 's':
    print(s + 'es')
else:
    print(s + 's')

Submission status: Accepted

Solution code:
s = input()
if(s[-1] == 's'):
    s = s+ 'es'
else:
    s = s+'s'
print(s)

Submission status: Accepted

Solution code:
S = input()
print(S+'s' if S[-1]!='s' else S+'es')

Submission status: Accepted

Solution code:
S = input()
print(S+"es" if S.endswith('s') else S+"s")

Submission status: Accepted

Solution code:
def main():
    S=input()
    if S[len(S)-1]=="s":
        print(S+"es")
    else:
        print(S+"s")

if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
s=input()
if s[-1]=="s":
    print(s+"es")
    exit()
else:
    print(s + "s")

Submission status: Accepted

Solution code:
import sys
# sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    S = input()
    if S[-1] == "s":
        print(S + "es")
    else:
        print(S + "s")
    return


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()

if s[-1] != 's':
    s += 's'
elif s[-1] == 's':
    s += 'es'

print(s)

Submission status: Accepted

Solution code:
#!/usr/bin python3
# -*- coding: utf-8 -*-

s = input()
if s[-1]=='s':
    print(s+"es")
else:
    print(s+"s")

Submission status: Accepted

Solution code:
# /usr/bin/python3
# -*- coding: utf-8 -*-
from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt, floor, ceil, log2, log10, pi
from fractions import gcd
from itertools import permutations, combinations
from operator import itemgetter
from functools import cmp_to_key
from bisect import bisect_left


INF=1001001001
__MOD__=(10**9)+7
yn = 'YNeos'
judge = False
cnt = 0
ans = None


def lcm(a, b):
    return (a*b) // gcd(a,b)

def intinput():
    return int(input())

def mulinputs():
    return map(int,input().split())

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas

def bindex(a,x):
    i = bisect_left(a,x)
    if i != len(a) and a[i] == x:
        return i
    return None

class ModInt():
    def __init__(self, x):
        self.__x = (x % __MOD__)
    def __add__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x + other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x + other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __radd__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x + self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x + self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __sub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x - other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x - other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rsub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x - self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x - self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __mul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rmul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __truediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rtruediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __pow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(self.__x, other.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(self.__x, other.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")
    def __rpow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(other.__x, self.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(other.__x, self.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")

    def __modinv(self, m=__MOD__):
        a = self.__x
        if a == 0:
            raise ZeroDivisionError()
        if gcd(a, m) != 1:
            raise Exception("%sの逆数は求まりません。" % a)
        b, u, v = m, 1, 0
        while b != 0:
            t = a//b;
            a -= t*b
            a, b = b, a
            u -= t * v
            u, v = v, u
        u %= m
        if u < 0:
            u += m
        return u
    def __int__(self):
        return self.__x
    def __str__(self):
        return str(self.__x)



if __name__ == '__main__':
    S = input()

    if S[-1] == 's':
        print(S+'es')
    else:
        print(S+'s')

Submission status: Accepted

Solution code:
s=input()

if s[-1]=='s':
  print(s+'es')
  
else:
  print(s+'s')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import *

S = input()[:-1]

if S[-1]=='s':
    S += 'es'
else:
    S += 's'

print(S)

Submission status: Accepted

Solution code:
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    sys.setrecursionlimit(10**7)
    INF = 10**18
    MOD = 10**9 + 7
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    _LI = lambda : [int(x)-1 for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()
    DD = ((1,0),(0,1),(-1,0),(0,-1))

    S = SI()
    if S[-1] == 's':
        S += 'es'
    else:
        S += 's'
    print(S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input().strip()
if S[-1]!="s":
    print(S+"s")
else:
    print(S+"es")

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from math import gcd
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, gcd
from operator import mul
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = 10 ** 13
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().rstrip().split()
def S(): return sys.stdin.readline().rstrip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]

mod=10**9+7


s=S()
if s[-1]=="s":
    s+="es"
else:
    s+="s"
print(s)

Submission status: Accepted

Solution code:
S = input()
if S[-1] =="s":
    print(S + "es")
else: print(S + "s")

Submission status: Accepted

Solution code:
#= [int(s) for s in input().split()]
word = input()
if word[-1] == 's':
    print(word + "es")
else:
    print(word + "s")

Submission status: Accepted

Solution code:
n = str(input())
#a,b = map(int,input().split())
if n[-1] == "s":
    print(n+"es",sep = "")
else:
    print(n+"s",sep = "")

Submission status: Accepted

Solution code:
S = input()

if S[-1] == 's':
    print(S + 'es')
else:
    print(S + 's')

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A = input()
if A[-1] != "s":
    print(A+"s")
else:
    print(A+"es")

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque, Counter, OrderedDict
from bisect import bisect_left, bisect_right
from functools import reduce, lru_cache
from heapq import heappush, heappop, heapify

import itertools
import math, fractions
import sys, copy

def L(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline().rstrip())
def SL(): return list(sys.stdin.readline().rstrip())
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return [list(x) for x in sys.stdin.readline().split()]
def R(n): return [sys.stdin.readline().strip() for _ in range(n)]
def LR(n): return [L() for _ in range(n)]
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def LIR1(n): return [LI1() for _ in range(n)]
def SR(n): return [SL() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]

def perm(n, r): return math.factorial(n) // math.factorial(r)
def comb(n, r): return math.factorial(n) // (math.factorial(r) * math.factorial(n-r))

def make_list(n, *args, default=0): return [make_list(*args, default=default) for _ in range(n)] if len(args) > 0 else [default for _ in range(n)]

dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
alphabets = "abcdefghijklmnopqrstuvwxyz"
ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
MOD = 1000000007
INF = float("inf")

sys.setrecursionlimit(1000000)

def main():

    S = input()
    if S[-1] == "s":
        print(S+"es")
    else:
        print(S+"s")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#%%
S = input()
if S[-1] == 's':
    print(S+'es')
else:
    print(S+'s')

Submission status: Accepted

Solution code:
s = input()
if s[-1] != 's':
  ans = s + 's'
else:
  ans = s + 'es'
print(ans)

Submission status: Accepted

Solution code:
## for use in beginner level questions where speed is key
## and also for single test case code
## mastercopy for x,y,z

import sys
import heapq, functools, collections
import random
from collections import Counter, defaultdict

# read line as a string
strr = input()

# read line as an integer
# k = int(input())

# read one line and parse each word as a string
# lst = input().split()

# read one line and parse each word as an integer
# arr = list(map(int,input().split()))

if strr[-1] == "s":
    print(strr + "es")
else:
    print(strr + "s")

Submission status: Accepted

Solution code:
s = input()
if s[-1] == "s":
  s += "e"
print(s + "s")

Submission status: Accepted

Solution code:
s=input()
if (s[-1]=='s'):
    print(s+'es')
else:
    print(s+'s')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

#l = list(map(int, input().split()))
#import numpy as np
#arr = np.array([int(i) for i in input().split()])
'''
a,b=[],[]
for i in range(n):
    A, B = map(int, input().split())
    a.append(A)   
    b.append(B)'''

s=input().strip("\n")

if s[-1]=="s":
    print(s+"es")
else:
    print(s+"s")

Submission status: Accepted

Solution code:
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

s=S()
if s[-1]!='s':
    print(s+'s')
else:
    print(s+'es')

Submission status: Accepted

Solution code:
s  = input()
if s[-1] =='s':
    print(s+'es')
else:
    print(s+'s')

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    S = input()
    if S[-1] == "s":
        print(S+"es")
    else:
        print(S+"s")

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def main():
    S = input()
    if S[-1] == "s":
        print(S + "es")
    else:
        print(S + "s")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
S = input()
if S[-1]=="s":
    S += "es"
else:
    S += "s"
print(S)

Submission status: Accepted

Solution code:
S = input()

if S[-1] == 's':
  print(S+'es')
else:
  print(S+'s')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush
import collections
import bisect

def main():
    S = input()

    if S[-1] == 's':
        print(S + 'es')
    else:
        print(S + 's')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S = input()
if S[-1] != 's':
	print(S + 's')
else:
	print(S+'es')

Submission status: Accepted

Solution code:
# import numpy as np
import sys, math, heapq
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial, gcd
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep="\n")

S = input()

if S[-1] != "s":
    out = S + "s"
else:
    out = S + "es"
print(out)

Submission status: Accepted

Solution code:
s=raw_input()
if s[-1]=='s':
    print s+'es'
else:
    print s+'s'

Submission status: Accepted

Solution code:
S=input()
if S[-1]=='s':
    S+='es'
else:
    S+='s'
print(S)

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy

if __name__ == "__main__":
    s = input()
    if s[-1] == "s":
        print(s + "es")
    else:
        print(s + "s")

Submission status: Accepted

Solution code:
s = input()

if s.endswith("s"):
  print(s + "es")
else:
  print(s + "s")

Submission status: Accepted

Solution code:
s=input();print([s+'s',s+'es'][s[-1]=='s'])

Submission status: Accepted

Solution code:
s = input()
if s[-1] == "s":
    s = s+ "es"
else:
    s = s + "s"
print(s)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

#import
#import math
#import numpy as np
#= int(input())
s = input()
#= map(int, input().split())
#= list(map(int, input().split()))
#= [input(), input()]
#= [list(map(int, input().split())) for _ in range(N)]
#= [int(input()) for _ in range(N)]
#= {i:[] for i in range(N)}

if s[-1] == "s":
    print(s + "es")
else:
    print(s + "s")

Submission status: Accepted

Solution code:
a=input()
if a[-1]=="s":
   print(a+"es")
else:
   print(a+"s")

Submission status: Accepted

Solution code:
x=input()
if x[-1]=="s":
    print(x+"es")
else:
    print(x+"s")

Submission status: Accepted

Solution code:
from collections import Counter
import sys
import math
from functools import cmp_to_key

sys.setrecursionlimit(10 ** 6)

mod = 1000000007
inf = int(1e18)


def main():
    s = input()
    if s[-1] == "s":
        print(s + "es")
    else:
        print(s + "s")

main()

Submission status: Accepted

Solution code:
s=input()
if s[-1]=='s':print(s+'es')
else:print(s+'s')

Submission status: Accepted

Solution code:
def main():
    s = input()

    if s[-1] == 's':
        s = s + 'es'
    else:
        s = s + 's'
    print(s)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
from math import gcd, factorial, ceil, floor, sqrt
from bisect import bisect_left, bisect_right
from copy import deepcopy
from heapq import heapify, heappop, heappush
from itertools import permutations, combinations, product, accumulate
from collections import defaultdict, deque, Counter
sys.setrecursionlimit(10**7)

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

s = input()
if s[-1] == 's':
    print(s+'es')
else:
    print(s+'s')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    S=input()
    if S[-1] != "s":
        print(S+"s")
    else:
        print(S+"es")
    




if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()
print(s + 's' if s[-1] != 's' else s + 'es')

Submission status: Accepted

Solution code:
s = input()
print (s+"es") if s[-1] == "s" else print (s+"s")

Submission status: Accepted

Solution code:
S = input()

if S[-1] == 's':
    print(S + 'es')
else:
    print(S + 's')

Submission status: Accepted

Solution code:
s = input()

res = ''
if s[-1] == 's':
    res = s + 'es'
else:
    res = s + 's'

print(res)

Submission status: Accepted

Solution code:
n = input()

if n[-1] == "s":
    k = n + "es"
else:
    k = n + "s"

print(k)

Submission status: Accepted

Solution code:
n = input()
if n[-1]=="s":
  print(n+"es")
else:
  print(n+"s")

Submission status: Accepted

Solution code:
s = input()
n = len(s)
if s[n - 1] == "s":
    s += "es"
    print(s)
else:
    s += "s"
    print(s)

Submission status: Accepted

Solution code:
s=input()
if s[-1]=='s':s+='es'
else:s+='s'
print(s)