def makePigLatin(word):
    m = len(word)
    vowels = ('a', 'e', 'i', 'o', 'u', 'y')
    if ((m < 3) or (word == 'the')):
        return word
    else:
        for i in vowels:
            if ((word.find(i) < m) and (word.find(i) != (- 1))):
                m = word.find(i)
        if (m == 0):
            return (word + 'way')
        else:
            return ((word[m:] + word[:m]) + 'ay')
def makePigLatin(word):
    m = len(word)
    vowels = ('a', 'e', 'i', 'o', 'u', 'y')
    if ((m < 3) or (word == 'the')):
        return word
    else:
        for i in vowels:
            if ((word.find(i) < m) and (word.find(i) != (- 1))):
                m = word.find(i)
        if (m == 0):
            return (word + 'way')
        else:
            return ((word[m:] + word[:m]) + 'ay')