r=range(81) for x in r: t='' for y in r:t+="X "[max(x/3**z%3-y/3**z%3&1for z in r)] print t