func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     long long n;     cin >> n;     if (n < 3) {       cout << -1;     } else {       long long a[n][n];       long long offset = n * n - 9;       a[0][0] = 9 + offset;       a[0][1] = 5 + offset;       a[0][2] = 6 + offset;       a[1][0] = 7 + offset;       a[1][1] = 2 + offset;       a[1][2] = 8 + offset;       a[2][0] = 1 + offset;       a[2][1] = 3 + offset;       a[2][2] = 4 + offset;       long long x = 0;       for (long long j = n - 1; j > (long long)2; --j) {         if (j & 1) {           for (long long i = 0; i < (long long)j + 1; ++i) {             a[i][j] = ++x;           }           for (long long i = j - 1; i > (long long)-1; --i) {             a[j][i] = ++x;           }         } else {           for (long long i = 0; i < (long long)j + 1; ++i) {             a[j][i] = ++x;           }           for (long long i = j - 1; i > (long long)-1; --i) {             a[i][j] = ++x;           }         }       }       for (long long i = 0; i < (long long)n; ++i) {         for (long long j = 0; j < (long long)n; ++j) {           cout << a[i][j] <<    ;         }         cout <<   n ;       }     }     return 0;   }   