n=r=input() c=v=0 h=1 while n: for _ in"_"*int(n):c+=h;r+=v;print`c-1`+`r-1`, h,v=v,-h;n-=.5