You are given two sequences of integers $$$a_1, a_2, \ldots, a_n$$$ and $$$b_1, b_2, \ldots, b_n$$$.
Determine the minimum number of exchanges of pairs of elements in the sequence $$$a$$$ required for $$$a$$$ to match $$$b$$$.
The first line contains a single integer $$$n$$$ ($$$1 \le n \le 30$$$) — the length of the sequences.
The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le n$$$).
The third line contains $$$n$$$ integers $$$b_1, b_2, \ldots, b_n$$$ ($$$1 \le b_i \le n$$$).
It is guaranteed that $$$a$$$ and $$$b$$$ are equal when the elements within each of them are sorted in non-decreasing order. Elements in the sequences may repeat.
In the first line, print $$$m$$$ — the minimum number of exchanges required to transform $$$a$$$ into $$$b$$$.
In the $$$i$$$-th of the following $$$m$$$ lines, print two distinct integers $$$x_i, y_i$$$ ($$$1 \le x_i, y_i \le n$$$), indicating that in the $$$i$$$-th exchange, $$$a_{x_i}$$$ and $$$a_{y_i}$$$ should be swapped.
31 2 33 2 1
1 1 3
41 1 2 22 2 1 1
2 2 3 1 4
91 3 2 2 1 3 3 2 12 1 3 3 2 1 1 3 2
6 9 3 3 2 5 4 4 6 1 8 8 7