for i in range(81):x,s='X ';exec"x=[x+s+x,s+x+s][i%3%2];i/=3;s*=3;"*4;print x