The chef is trying to solve some pattern problems, Chef wants your help to code it. Chef has one number K to form a new pattern. Help the chef to code this pattern problem.
-----Input:-----
- First-line will contain $T$, the number of test cases. Then the test cases follow. 
- Each test case contains a single line of input, one integer $K$. 
-----Output:-----
For each test case, output as the pattern.
-----Constraints-----
- $1 \leq T \leq 50$
- $1 \leq K \leq 50$
-----Sample Input:-----
5
1
2
3
4
5
-----Sample Output:-----
*
*
***
*
* *
*****
*
* *
*   *
*******
*
* *
*   *
*     *
*********   
-----EXPLANATION:-----
No need, else pattern can be decode easily.
for _ in range(int(input())):
    K = int(input())
    if K == 1:
        print('*')
    elif K == 2:
        print(" * ")
        print("***")
    else:
        a = K - 1
        s = K - 2
        print(" "*(s+1) + "*")
        for i in range(1, K-1):
            print(" "*s + "*" + " "*((a-s)*2-1) +  "*")
            s -= 1
        print("*" * (K*2-1))
for _ in range(int(input())):
    K = int(input())
    if K == 1:
        print('*')
    elif K == 2:
        print(" * ")
        print("***")
    else:
        a = K - 1
        s = K - 2
        print(" "*(s+1) + "*")
        for i in range(1, K-1):
            print(" "*s + "*" + " "*((a-s)*2-1) +  "*")
            s -= 1
        print("*" * (K*2-1))