Consider an infinite triangle divided into smaller triangles numbered as shown in the following figure. Two of these smaller triangles are adjacent if they share a common border (not just a common point). Since each triangle has three sides, a triangle is adjacent to at most three other triangles. Triangles that are adjacent to two or fewer other triangles are on the border of the infinite triangle.

Given the number of a triangle, it is simple to visually determine the numbers of the triangles that are adjacent to it. For example, if we are given the number , the triangles that are adjacent to it are , , and . If we pick a border triangle, such as , we can still easily determine that the only triangles that are adjacent to it are and . Your task is to write a program that performs this function.
The first line of the input contains an integer that represents the number of queries. Each of the following lines contains a single integer, representing the number of a triangle.
1 \leq n \leq 100. The number of each triangle in the input will be between and , inclusive.
Your program should produce lines of output (one for each query). For each query, output the numbers of the triangles that are adjacent to the input triangle, in ascending order. There should be a single space between each pair of triangle numbers.
The output format should match the sample output below.
Example
2
13
257 12 14
24 35Example 1