-module(t). -export([m/0]). m()->{_,[N]}=io:fread('',"~d"),L=lists:seq(1,N),[io:format([3div(I rem N+2)bor 3div(J rem N+2)+48||J<-L]++" ")||I<-L].