#!/usr/bin/env python3
# -*- coding:utf-8 -*-

num = int(input(""))

for i in range(num-1):
    print(" ",end="")
print("*")

for i in range(num-2):
    for j in range(3):
        for k in range(num-1-i-j):
            print(" ",end="")        
        for k in range(2*i+2*j+1):
            print("^",end="")
        print("")

for i in range(num-2):
    for j in range(num//2+1):
        print(" ",end="")
    for j in range(num-2):
        print("#",end="")
    print("")
1512e674e22a379e2ffbadb506c27f72c023f1ab
<mask token>

<mask token>
for i in range(num - 1):
    print(' ', end='')
print('*')
for i in range(num - 2):
    for j in range(3):
        for k in range(num - 1 - i - j):
            print(' ', end='')
        for k in range(2 * i + 2 * j + 1):
            print('^', end='')
        print('')
for i in range(num - 2):
    for j in range(num // 2 + 1):
        print(' ', end='')
    for j in range(num - 2):
        print('#', end='')
    print('')

num = int(input(''))
for i in range(num - 1):
    print(' ', end='')
print('*')
for i in range(num - 2):
    for j in range(3):
        for k in range(num - 1 - i - j):
            print(' ', end='')
        for k in range(2 * i + 2 * j + 1):
            print('^', end='')
        print('')
for i in range(num - 2):
    for j in range(num // 2 + 1):
        print(' ', end='')
    for j in range(num - 2):
        print('#', end='')
    print('')

#!/usr/bin/env python3
# -*- coding:utf-8 -*-

num = int(input(""))

for i in range(num-1):
    print(" ",end="")
print("*")

for i in range(num-2):
    for j in range(3):
        for k in range(num-1-i-j):
            print(" ",end="")        
        for k in range(2*i+2*j+1):
            print("^",end="")
        print("")

for i in range(num-2):
    for j in range(num//2+1):
        print(" ",end="")
    for j in range(num-2):
        print("#",end="")
    print("")