#打印出一个空心正方形
num = input ("zheng fang xing bian chang :")
num = int(num)
for i in range(num):
if i == 0 or i == (num-1):
print ("#\t"num)
else:
print ("#"+"\t"(num-1)+"#")
#打印出一个空心正方形
num = input ("zheng fang xing bian chang :")
num = int(num)
for i in range(num):
if i == 0 or i == (num-1):
print ("#\t"num)
else:
print ("#"+"\t"(num-1)+"#")