Tomy has many paper-squares. The side length(we call it ’size’) of them range from 1 to N − 1, and he has a really COUNTLESS squares of each kind. He used to be very proud of his squares, but one day, he suddenly wants to have a bigger one – a square of size N! Though he doesn’t have such a square, he can make it up with the squares he has. For example. A square of size 7 can be made up with 9 smaller squares, shown below. Note that there should be NO empty space in the square, and NO extra paper outside the square, and the small squares should NOT overlap. As you may guess, Tomy wants to make it using the minimal number of squares he has, can you help? Input The first line of the input contains a single integer T , indicating the number of test cases (1 ≤ T ≤ 20). Each case contains a single integer N (2 ≤ N ≤ 50). Output For each test case in the input, print a line containing a single integer K, indicating the minimal number of squares needed to build the target square. In the following K lines, each contains three integers x, y, l indicating the coordinates of top-left corner, and the side length of the corresponding square (1 ≤ x,y ≤ N).
2/2 Sample Input 3 4 3 7 Sample Output 4 112 132 312 332 6 112 131 231 311 321 331 9 112 132 311 411 322 513 444 153 341