#K69502. Zigzag Pattern Generator

    ID: 33100 Type: Default 1000ms 256MiB

Zigzag Pattern Generator

Zigzag Pattern Generator

You are given an integer N representing the height of a zigzag pattern. Your task is to generate a zigzag pattern where the first part of the pattern contains N lines, starting with N-1 leading spaces and decreasing to 0, and the second part contains N-1 lines with increasing spaces from 1 to N-1. Specifically, for each test case, you need to print the pattern followed by a blank line.

For example, if N = 3, the resulting zigzag pattern should be:

  *
 *
*
 *
  *

This problem will have multiple test cases. You must process each test case independently. All input is provided via standard input (stdin) and all output should be written to standard output (stdout).

inputFormat

The first line of input contains an integer T representing the number of test cases. The following T lines each contain one integer N representing the height of the zigzag pattern for that test case.

Input format:

T
N1
N2
...
NT

outputFormat

For each test case, output the zigzag pattern as described. Each pattern consists of 2 (N) - 1 lines. After each test case, output a blank line to separate the patterns.

## sample
3
3
1
4
  *

</p>