m@main=do n<-readLn;putStrLn$[0..8]>>=(\i->"01"!!mod(fromEnum("x\0t@*@t\0x"!!i)`div`2^n)2:cycle" \n"!!i:"");m