while 1: j=range(int(input()*2+1)) for i in j:print" ".join([str([0,k*j[-k]][i+1==k])for k in j])