#include #define FOR(i,a,b) for(int i=a;i=a;--i) using namespace std; int main(){ int n; cin>>n; int b[300][300]={}; int k=1; FOR(i,0,n/2){ FOR(j,0,n/2){ b[i][j]=k; k++; b[i+n/2][j+n/2]=k; k++; } } FOR(i,0,n/2){ ROF(j,0,n/2){ b[i][j+n/2]=k; k++; b[i+n/2][j]=k; k++; } } FOR(i,0,n){ FOR(j,0,n){ cout<