for(c=readline(),s=[z=" ##",w=" #",t="#",t,t,w,z];--c;)for(x in s)s[x]+=x%6?" #":" ##";print(s.join(n="\n")+n)