PROGRAMMING:Eight queens problem
People who can play chess are very clear: the queen can eat other pieces in the horizontal, vertical and diagonal lines with unlimited steps. How to put 8 queens on the chessboard (8 * 8 squares), so that no one can be eaten! This is the famous eight queens problem.
For a placement method of 8 queens that meets the requirements, define a queen string a corresponding to it, that is, a = b1b2... B8, where Bi is the column number of the i-th row queens in the corresponding placement method. It is known that there are 92 sets of solutions to the eight queens problem (92 different queens).
Given a number B, it is required to output the b-th string. The comparison of strings is as follows: Queen string x precedes queen string y and is smaller than y if and only if x is treated as an integer..
###Input format:
The first line is the number of test data groups n, followed by N lines of input. Each group of test data occupies 1 line, including a positive integer B (1 < = B < = 92).
###Output format:
The output has n lines, and each line of output corresponds to an input. The output should be a positive integer, which is the queen string corresponding to B.
###Input example:
```in
two
one
ninety-two
```
###Output example:
```out
fifteen million eight hundred and sixty-three thousand seven hundred and twenty-four
eighty-four million one hundred and thirty-six thousand two hundred and seventy-five
```
answer:If there is no answer, please comment
For a placement method of 8 queens that meets the requirements, define a queen string a corresponding to it, that is, a = b1b2... B8, where Bi is the column number of the i-th row queens in the corresponding placement method. It is known that there are 92 sets of solutions to the eight queens problem (92 different queens).
Given a number B, it is required to output the b-th string. The comparison of strings is as follows: Queen string x precedes queen string y and is smaller than y if and only if x is treated as an integer..
###Input format:
The first line is the number of test data groups n, followed by N lines of input. Each group of test data occupies 1 line, including a positive integer B (1 < = B < = 92).
###Output format:
The output has n lines, and each line of output corresponds to an input. The output should be a positive integer, which is the queen string corresponding to B.
###Input example:
```in
two
one
ninety-two
```
###Output example:
```out
fifteen million eight hundred and sixty-three thousand seven hundred and twenty-four
eighty-four million one hundred and thirty-six thousand two hundred and seventy-five
```
answer:If there is no answer, please comment