from re import * s=' %s \n'%sub('. # .','\n---+---+---\n',' | '.join('1 4#72 #563'));t=1 exec"s=sub(`t`,'OX'[t%2],s);print sub('\d',' ',s);t+=1;"*7