main@m=readLn>>=f.floor.(*2)>>m f n=putStr$unlines[unwords[show$i*(n-j+1)*0^abs(i-j)|i<-[0..n]]|j<-[1..n+1]]