R=range(1,input()+1) for x in R: s="" for y in R: a=x while a:a,y=y%a,a s+=" t"[y<2] print s