#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int nSq = n * n;
  int bags[n][n];
  for (int i = 1, j = nSq, k = 0, l = 0; i <= nSq / 2; ++i, --j, ++k) {
    if (k == n) {
      k = 0;
      l += 2;
    }
    bags[k][l] = i;
    bags[k][l + 1] = j;
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      cout << bags[i][j] << " ";
    }
    cout << endl;
  }
  return 0;
}
