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