#include <bits/stdc++.h>
using namespace std;
void desperate_optimization(int precision) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.setf(ios::fixed);
  cout.setf(ios::showpoint);
  cout.precision(precision);
}
const int N = 10;
long long arr[N + 5][N + 5];
void hora(int tc) {
  srand(time(NULL));
  int n;
  cin >> n;
  long long base = 1;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++)
      arr[i][j] = arr[j][i] = base * j * (rand() % 10 + j);
    base *= 10;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (j) cout << " ";
      cout << arr[i][j];
    }
    cout << '\n';
  }
}
int main() {
  desperate_optimization(10);
  int ntc = 1;
  for (int tc = 1; tc <= ntc; tc++) hora(tc);
  return 0;
}
