def find_cadence(chords):
    pu, ul = chords[-2:]
    if (pu, ul) == ('V', 'I'):
        return 'perfect'
    if (pu, ul) == ('IV', 'I'):
        return 'plagal'
    if pu == 'V':
        return 'interrupted'
    if ul == 'V':
        return 'imperfect'
    return 'no cadence'

fd9cd57071223fd06217af2f73a8b7329a69f406
<mask token>

def find_cadence(chords):
    pu, ul = chords[-2:]
    if (pu, ul) == ('V', 'I'):
        return 'perfect'
    if (pu, ul) == ('IV', 'I'):
        return 'plagal'
    if pu == 'V':
        return 'interrupted'
    if ul == 'V':
        return 'imperfect'
    return 'no cadence'
