from PythonLabs.Tools import prefix

def plural(w):
    "Return the plural form of word w."
    if w.endswith('h') or w.endswith('s'):
        return w + 'es'
    elif w.endswith('y'):
        return prefix(w) + 'ies'
    else:
        return w + 's'
