main=do n<-readLn;mapM putStrLn[["* "!!div(x^2+y^2)(n^2+1)|x<-[-n..n]]|y<-[-n..n]]