#include <bits/stdc++.h>
using namespace std;
int N;
long long a[10][10], pow_10[11];
int main() {
  cin >> N;
  pow_10[0] = 1;
  for (int i = 1; i <= 10; ++i) {
    pow_10[i] = pow_10[i - 1] * 10;
  }
  for (int i = 0; i < N; ++i) {
    for (int j = i + 1; j < N; ++j) {
      a[i][j] = a[j][i] = pow_10[i] * j;
    }
  }
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < N; ++j) {
      cout << a[i][j];
      if (j != N - 1) cout << ' ';
    }
    cout << endl;
  }
}
