#include #include #include #include #include using namespace std; int n; int i; int j; vector> B; void search(int r, int c, int s); void next(int rn, int cn, int s) { if (0<=rn && rn s) { Bn = s; search(rn, cn, s+1); } } } void search(int r, int c, int s) { next(r+i, c+j, s); next(r-i, c+j, s); next(r-i, c-j, s); next(r+i, c-j, s); next(r+j, c+i, s); next(r-j, c+i, s); next(r-j, c-i, s); next(r+j, c-i, s); } int main() { cin >> n; for (i = 1; i < n; ++i) { for (j = 1; j < n; ++j) { B = vector>(n,vector(n, -1)); search(0,0,1); cout << B[n-1][n-1] << (j