E. Arpa’s overnight party and Mehrdad’s silent entering
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Note that girls in Arpa’s land are really attractive.
Arpa loves overnight parties. In the middle of one of these parties Mehrdad suddenly appeared. He saw n pairs of friends sitting around a table. i-th pair consisted of a boy, sitting on the ai-th chair, and his girlfriend, sitting on the b