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 26$
- $1 \leq K \leq 26$

-----Sample Input:-----
2
2
4

-----Sample Output:-----
A
12
A
12
ABC
1234

-----EXPLANATION:-----
No need, else pattern can be decode easily.

Starter code:

Solutions:
try:
 for _ in range(int(input())):
  k=int(input())
  for i in range(1,k+1):
   print(" "*(k-i),end="")
   if i%2==1:
    for j in range(0,i):
     print(chr(65+j),end="")
   else:
    for j in range(0,i):
     print(j+1,end="")
   print()
  
   
except:
 pass

# cook your dish here
for _ in range(int(input())):
 n = int(input())
 k = n
 m = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 while k > 0:
  if (n-k+1)%2 == 0:
   print(" "*(k-1), end="")
   print(*(list(range(1,n-k+2))), sep= "")
  else:
   print(" "*(k-1), end="")
   print(m[:(n-k+1)])
  k = k -1


for _ in range(int(input())):
 n = int(input())
 k = n
 m = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 while k > 0:
  if (n-k+1)%2 == 0:
   print(" "*(k-1), end="")
   print(*(list(range(1,n-k+2))), sep= "")
  else:
   print(" "*(k-1), end="")
   print(m[:(n-k+1)])
  k = k -1


# cook your dish here
for i in range(int(input())):
 n=int(input())
 count=0
 for j in range(1,n+1):
  c=65
  z=1
  space=n-j
  star=j
  if j%2!=0:
   print(space*' ',end='')
   for l in range(star):
    print(chr(c),end='')
    c+=1
     
  else:
   print(space*' ',end='')
   for l in range(star):
    print(z,end='')
    z=z+1
  print()
    
  
 

for _ in range(int(input())):
 n = int(input())
 for i in range(1,n+1+1):
  if i%2 == 0:
   for j in range(1,n-i+2):
    print(end=" ")
   num = 65
   for k in range(1,n-(n-i)):
    print(chr(num),end="")
    num += 1
   print("")
  else:
   for j in range(1,n-i+2):
    print(end=" ")
   for k in range(1,n-(n-i)):
    print(k,end="")
   print("")

# cook your dish here
t = int(input())
for i in range(t):
 n = int(input())
 for i in range(1,n+1):
  print(" " * (n - i), end="")
  if i%2:
   for j in range(i): print(chr(ord('A')+j),end="")
  else:
   for j in range(i):print(j+1,end="")
  print()

# cook your dish here
t = int(input())
for i in range(t):
 n = int(input())
 for i in range(1,n+1):
  str1 = ""
  print(" "*(n-i),end="")
  if i%2==1:
   for j in range(1,i+1):
    str1 = str1 + chr(64+j)
   print(str1)
  else:
   for i in range(1,i+1):
    print(i,end="")
   print()# cook your dish here


# cook your dish here
t = int(input())
for i in range(t):
 n = int(input())
 for i in range(1,n+1):
  str1 = ""
  print(" "*(n-i),end="")
  if i%2==1:
   for j in range(1,i+1):
    str1 = str1 + chr(64+j)
   print(str1)
  else:
   for i in range(1,i+1):
    print(i,end="")
   print()# cook your dish here


# cook your dish here

t = int(input())

while t:
 n = int(input())
 
 
 for i in range(1, n + 1):
  k = 1
  m = 65
  for j in range(n, 0, -1):
   if j > i:
    print(" ", end='')
   else:
    if i % 2 == 0:
     print(k, end='')
     k += 1
    else:
     print(chr(m), end='')
     m += 1
     

  print("")
 
 
 t -= 1

for _ in range(int(input())):
 alphabets="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 k=int(input())
 for i in range(1,k+1):
  if(i%2==1):
   string=alphabets[:i]
   print(" "*(k-i),end="")
   print(string)
  else:
   print(" "*(k-i),end="")
   for j in range(1,i+1):
    print(j,end="")
   print("")





for _ in range(int(input())):
 n=int(input())
 x=n
 a,b=65,1
 for _ in range(1,n+1):
  for i in range(1,x):
   print(' ',end="")
  if _%2==1:
   for _ in range(_):
    print(chr(a),end="")
    a+=1
   print() 
  else:
   for _ in range(_):
    print(b,end="")
    b+=1
   print() 
  a=65
  b=1
  x-=1
 print() 
   

n=int(input())
for i in range(n):
 m=int(input())
 a=""
 b="1"
 p=65
 q=2
 for j in range(m):
  if j%2==0:
   a=a+chr(p)
   print(a)
   p+=1
   a=a+chr(p)
   p+=1
  else:
   b=b+str(q)
   print(b)
   q=q+1
   b=b+str(q)
   q=q+1

# cook your dish here
import string
a = string.ascii_uppercase
b = [i for i in range(1, 27)]
for _ in range(int(input())):
 k = int(input())
 if k == 1:
  print('A')
  continue

 for i in range(1, k+1):
  if i % 2 != 0:
   print(a[:i])
  else:
   print(''.join(str(j) for j in range(1, i+1)))


# cook your dish here
try:
 for _ in range(int(input())):
  n=int(input())
  k=n-1
  c=65
  num=1
  for i in range(0,n):
   for j in range(0,k):
    print(end=' ')
   k=k-1
   for j in range(0,i+1):
    if i%2==0:
     print(chr(c+j),end='')
    else:
     print(num+j,end='')
   print('\r')
except:pass 
     
     
     

# cook your dish here
try:
 for _ in range(int(input())):
  n=int(input())
  k=n-1
  c=65
  num=1
  for i in range(0,n):
   for j in range(0,k):
    print(end=' ')
   k=k-1
   for j in range(0,i+1):
    if i%2==0:
     print(chr(c+j),end='')
    else:
     print(num+j,end='')
   print('\r')
except:pass 
     
     
     

for t in range(int(input())):

 N = int(input())
 ans = []
 st = None
 numb = 0
 num = None

 for i in range(1,N+1):

  if i % 2 and i == 1:
   ans.append(chr(65))
   st = chr(65)

  elif i % 2:
   ans.append(st + chr(65 +len(st)) + chr(65 + len(st) + 1))

   st += chr(65 +len(st))
   st += chr(65 + len(st))

  else:

   if not num:
    num = '12'
    ans.append(num)
    numb = 2

   else:
    num += str(numb + 1)
    num += str(numb + 2)

    ans.append(num)
    numb += 2


 for i in ans:

  print(' '*(N-1) + i)
  N -= 1



try:   
 t = int(input())
 for _ in range(t):
  n = int(input())
  for x in range(1,n+1):
   for y in range(0,n-x):
    print(' ',end='')
   if x%2==0:
    for y in range(1,x+1):
     print(y,end='')
    print()
   else:
    for y in range(1,x+1):
     print(chr(64+y),end='')
    print()
except:
 pass

# cook your dish here
t = int(input())

def pattern(k):
 for i in range(1, k+1):
  if i%2 == 1:
   s = ''
   for j in range(i):
    s+=chr(65+j)
   s = ' '*(26-i) + s
   print(s)
  else:
   s=''
   for j in range(1, i+1):
    s+=str(j)
   s = ' '*(26-i) + s
   print(s)
 

for _ in range(t):
 k = int(input())
 pattern(k)

t = int(input())

while(t):
 
 t -= 1
 
 k = int(input())
 
 for i in range(1,k+1):
  for j in range(k-i):
   print(' ',end='')
  for j in range(i):
   if (i%2==1):
    print(chr(65+j),end='')
   else:
    print(j+1,end='')
  print()