def star(n):
if n == 3:
return ["***","* *","***"]
#아닌 경우, star 세트 만들어두기
stars = star(n//3)
answer = []
#윗줄
for s in stars:
answer.append(s*3)
#중간줄
for s in stars:
answer.append(s+' '*(n//3)+s)
#아랫줄
for s in stars:
answer.append(s*3)
return answer
n = int(input())
print('\n'.join(star(n)))