Initially, all natural numbers are arranged in a list in their standard order (that is, 1, 2, 3, \dots).
You are allowed to perform the following operation: swap(, ). This operation calculates the distance between the numbers and in the current list (i.e., the number of elements between them, including endpoints), then swaps their positions in the list. The distance is returned as the result of the operation.
You are given a sequence of swap operations. For each operation, output the result.
The first line contains an integer (1 \leq n \leq 200{,}000) — the number of operations.
Each of the next lines contains two integers and (1 \leq a, b \leq 10^9), the arguments for the swap operations.
For each operation, output its result on a separate line.
Example 1