#include <bits/stdc++.h>
int main() {
  int i, cnt = 1, t = 100, pos = 1, begin = 1;
  scanf("%d", &t);
  int end, ans[101][101];
  end = t * t;
  for (i = 1; i <= t; i++) {
    int j = 0;
    while (j < t / 2) {
      printf("%d ", i + (j * t));
      j++;
    }
    j = 0;
    while (j < t / 2) {
      printf("%d ", (t * t) - i + 1 - (j * t));
      j++;
    }
    printf("\n");
  }
  return 0;
}
