def opposite_player(player):
    """Finds the opposite player based on the input. Assumes only two players
    Args:
        player (string): Input player to invert
    Returns:
        (string): Opposite player from the input
    """
    if player == "X":
        return "O"
    else:
        return "X"