def full_key_name(piece):
    piece = piece.split()
    return ' '.join(piece) + ' major' if piece[-1][0].isupper() else ' '.join(
        piece[:-1]) + ' ' + piece[-1].capitalize() + ' minor'

337e8f022f0dbec242460066d59dd820491179a3
<mask token>

def full_key_name(piece):
    piece = piece.split()
    return ' '.join(piece) + ' major' if piece[-1][0].isupper() else ' '.join(
        piece[:-1]) + ' ' + piece[-1].capitalize() + ' minor'
