x = int(input())
for i in range(x):
for j in range(x):
print("*",end=" ")
Либо:
n = int(input())
for i in range(n):
print("* " * n)
x = int(input())
for i in range(x):
for j in range(x):
print("*",end=" ")
Либо:
n = int(input())
for i in range(n):
print("* " * n)