Highlander
"'markdown During the inaugural "Highlander" training ritual led by the trail shaman, Maktsakhmetl, each participant was paired with exactly one other participant to follow. This setup ensured that every Indian had exactly one follower.
For each "follower - leader" pair, Maktsakhmetl crafted a plaque inscribed with the code numbers of both individuals. Unfortunately, he neglected to record which number corresponded to the follower and which to the leader, and he also lost track of the original follower-leader assignments. Without this crucial information, he is unable to distribute the plaques correctly among the participants. Therefore, he needs to determine for each Indian whom they should follow to preserve the original conditions of the ritual.
The trail shaman has enlisted your help to reconstruct the initial follower-leader relationships for each Indian.
Input
The first line of the input contains a single integer N (1 ≤ N ≤ 100000), representing the number of Indians participating in the ritual. Each Indian is assigned a unique number from 1 to N. The following N lines each contain two distinct integers a_i and b_i, which are the code numbers inscribed on the i-th plaque.
Output
Output N integers k_i, where each k_i is the code number of the person whom the i-th Indian follows. If multiple solutions exist, you may print any one of them. "'