Problem: You have an array where .
In one step, you can choose two indices and () and set (ceiling function).
Your goal is to make array consist of ones and two in no more than steps. Note that you don't have to minimize the number of steps.
Input Format: The first line contains a single integer () — the number of test cases.
The first and only line of each test case contains the single integer () — the length of array .
It's guaranteed that the sum of over test cases doesn't exceed .
Output Format: For each test case, print the sequence of operations that will make as ones and two in the following format: firstly, print one integer () — the number of operations; next print pairs of integers and (; ) ( may be greater or less than ) — the indices of the corresponding operation.
It can be proven that for the given constraints it's always possible to find a correct sequence of operations.
Note: In the first test case, you have array . For example, you can do the following:
- choose , : and array ;
- choose , : and array .
In the second test case, . For example, you can do the following:
- choose , : and array ;
- choose , : and array ;
- choose , : and array .