def get_opponent(player):
    """
    Get the opponent character

    :param player: 'O' or 'X'
    :return: 'X' or 'O' respectively
    """
    if player == 'O':
        return 'X'
    else:
        return 'O'