def pig_latin(wrd):
    """Returns the Pig Latin version of a word.

    For words that begin with a consonant, take the consonant/consonant cluster
    and move it to the end of the word, adding the suffix 'ay' to the end of the word.

    For words that begin with a vowel, leave the word as is and add the
    suffix 'way' to the end of the word.

    >>> pig_latin('dog')
    'ogday'
    >>> pig_latin('brush')
    'ushbray'
    >>> pig_latin('elephant')
    'elephantway'
    >>> pig_latin('awesome')
    'awesomeway'
    >>> pig_latin('rhythm')
    'rhythmay'
    """
    idx = next((i for i, v in enumerate(wrd) if v in 'aeiou'), len(wrd))
    return wrd[idx:] + (wrd[:idx] or 'w') + 'ay'