def winner(row):
    """Returns the team name that won the game, otherwise returns 'TIE'"""
    if row.ptsv > row.ptsh:
        return row.v
    elif row.ptsh > row.ptsv:
        return row.h
    else:
        return 'TIE'