n=gets.to_i n.times do|i| n.times do|j| print 1+(i-j).abs,(j+1==n)?"\n":" " end end