5124: P6676 【征集 SPJ】[COCI2019-2020#2] Slagalica(普及)

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Input

Output

Sample Input Copy

5
1 5
2 7
2 3
8 4
6 1

Sample Output Copy

1 3 7 5 4

HINT