#include <bits/stdc++.h>
int main() {
  srand(20040725);
  int n;
  std::cin >> n;
  std::vector<std::vector<long long>> a(n);
  for (int i = 0; i < n; i++) a[i].resize(n);
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      a[i][j] = a[j][i] = (long long)rand() * rand() % 10000000000;
    }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      printf("%lld%c", a[i][j], " \n"[j + 1 == n]);
    }
}
