#K51072. Taco Tree Generator
Taco Tree Generator
Taco Tree Generator
You are given an integer T on the first line representing the number of tree structures to generate. For each of the following T lines, an integer n is provided which represents the number of levels for that tree.
For each tree, the structure is generated as follows:
- The first line is an asterisk "*".
- For i from 1 to n, two lines are appended:
- The first line consists of
(i-1)
spaces followed by a vertical bar "|". - The second line consists of
(i-1)
spaces followed by the string "-+".
When multiple trees are generated, they are separated by a blank line.
The output must exactly match the format as described.
inputFormat
The first line contains an integer T ($1 \le T \le 100$), the number of trees. The following T lines each contain an integer n ($1 \le n \le 100$), the number of levels for the corresponding tree.
Input is read from stdin.
outputFormat
For each tree, output the generated tree structure. Each tree structure should follow the format described in the problem. Separate consecutive trees with an empty line. Output is written to stdout.
## sample3
1
2
3
*
|
-+
|
-+
|
-+
|
-+
|
-+
|
-+
</p>