Prerna likes to eat. She likes decorating food items even more. Today she is in a party where there are many food items like Samosa, Laddoos Jalebi, Poha, Dhokla, Gulabjamun, etc. Each food item is mapped to an integer value. There are many food items so the numbers can be very large. The problem is that she doesn't like the arrangement of these items. All the food items are arranged in a linear fashion on a table. She would like to reorder them so that the table looks better. She also has a group of workers under her who would take instructions from her. The instructions are of the form - l1 r1 l2 r2
In this instruction Prerna asks her workers to swap the block of dishes [l1,r1] with the block [l2,r2]. All indices are 1 based.
She has a set of such instructions written on a paper and would like to know the output when all are executed.
INPUT
The first line contains an integer N, the number of dishes.
The line contains N (a1,a2,a3.....an) integers (the id of dishes)
The next line contain an integer Q, the number of instructions.
The next Q lines contain 4 integers each l1 r1 l2 r2
OUTPUT
Print the final order of dishes after all the operations.
CONSTRAINTS
1 <= n <= 10^5
1 <= Q <= 10^5
1 <= ai <= 10^9
1 <= l1 <= r1 < l2 <= r2 <= n
The block in the range 1-4 is swapped with the block in range 6-6