def track_swaps(input_text):
    def extract_initial_positions(input_text):
        initial_positions = {}
        players = ["Alice", "Bob", "Claire", "Dave", "Eve"]
        for player in players:
            position_start = input_text.find(player) + len(player) + len(" is playing ")
            position_end = input_text.find(".", position_start)
            initial_positions[player] = input_text[position_start:position_end]
        return initial_positions

    def perform_swaps(initial_positions, swaps):
        final_positions = initial_positions.copy()
        for swap in swaps:
            players_involved = swap.split(" and ")
            for i in range(len(players_involved) - 1):
                player1 = players_involved[i]
                player2 = players_involved[i + 1]
                final_positions[player1], final_positions[player2] = final_positions[player2], final_positions[player1]
        return final_positions

    def determine_final_player(final_positions):
        for player, position in final_positions.items():
            if position == "cheerleader":
                return player

    initial_positions = extract_initial_positions(input_text)
    print("Initial positions:", initial_positions)

    swaps = input_text.split("Then ")[1:]
    print("Swaps:", swaps)

    final_positions = perform_swaps(initial_positions, swaps)
    print("Final positions after swaps:", final_positions)

    final_player = determine_final_player(final_positions)
    print("Final player:", final_player)

    return f"({final_player})"

# Example task instances
input_text = "Alice is playing goalkeeper, Bob is playing striker, Claire is playing cheerleader, Dave is playing center midfielder, and Eve is playing right midfielder. As the game progresses, pairs of players occasionally swap positions. First, Eve and Dave trade positions. Then, Dave and Bob trade positions. Then, Dave and Claire trade positions. Then, Dave and Bob trade positions. Finally, Alice and Bob trade positions. At the end of the match, Claire is playing"
print("Final answer:", track_swaps(input_text))