In [ ]:
def get_plural(word): 
    if word.endswith('y'):  
        return word[:-1] + 'ies'  
    elif word[-1] in 'sx' or word[-2:] in ['sh', 'ch']:  
        return word + 'es'  
    else:  
        return word + 's'  
        
s = input(str) 
print(get_plural(s))