# n = int(input())
# for i in range(n, 0, -1):
# for j in range(0, i):
# print('*', end='')
#
# print()
# n = int(input())
# for i in range(0, n):
# if (i == 0) or (i == n-1):
# for j in range(0, n):
# print('*', end='')
# print()
# else:
# print('*', end='')
# for j in range(0, n-2):
# print(' ', end='')
# print('*', end='')
# print()
# n = int(input())
# for i in range(n-1, -1, -1):
# for j in range(0, i):
# print(' ', end='')
# for j in range(0, n):
# print('*', end='')
# print()
# n, k = input().split()
# n = int(n)
# k = int(k)
# for i in range(1, n+1):
# for j in range(1, n+1):
# if i == 1 or i ==n or j == 1 or j == n :
# print('*', end='')
# elif (j + i - 1) % k == 0:
# print('*', end='')
# else:
# print(' ', end='')
# print()
n = int(input())
for i in range(0, n):