#include <bits/stdc++.h>
using namespace std;
int n, j;
int main() {
  cin >> n;
  j = n * n;
  for (int i = 1; i <= n * n; i++) {
    cout << i << " " << j << " ";
    if (i == j - 1) break;
    j--;
  }
  return 0;
}
