def isWinner(board):
    """Looks at `board` and returns either '1' or '2' if there is a winner or
    'tie' or 'no winner' if there isn't. The game ends when a player has 24 or
    more seeds in their mancala or one side of the board has 0 seeds in each
    pocket."""

    b = board # Make a shorter variable name to use in this function.

    # If either players has >= 24 or no seeds, the game ends.
    if (b['1'] >= 24) or (b['2'] >= 24) or \
       (b['A'] + b['B'] + b['C'] + b['D'] + b['E'] + b['F'] == 0) or \
       (b['G'] + b['H'] + b['I'] + b['J'] + b['K'] + b['L'] == 0):

        # Game is over, find player with largest score.
        if b['1'] > b['2']:
            return '1'
        elif b['2'] > b['1']:
            return '2'
        else:
            return 'tie'
    return 'no winner'