for(y=n='#139'[readline()]*3;c='',y--;print(c))for(x=n;x--;)c+=(x%3&y%3|x/3%3&y/3%3|x/9%3&y/9%3)&1?' ':'::'