Zero
Let’s consider the sequence of digits from 1 through N (where N = 9) in increasing order: 1 2 3 ... N. Now insert either a "+" for addition or a "-" for subtraction or a " " [blank] to run the digits together, between each pair of digits (not in front of the first digit). Calculate the result that of the expression and see if you get zero.
Write a program that will find all sequences of length N that produce a zero sum.
Input
The first line of the input contains the number of test cases T (T < 10). Single test case is represented by single line that contains the integer N (3 ≤ N ≤ 9).
Output
For each test case in ASCII order, print each sequence that can create 0 sum with a '+', '-', or ' ' (space) between each pair of numbers. Space shows that the digits run together. Different test cases should be separated by an empty line.