#include <bits/stdc++.h>
using namespace std;
const int N = 11;
int n, id[N][N], tot;
int main() {
  scanf("%d", &n);
  if (n < 10) {
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= n; ++j)
        if (i < j) id[i][j] = tot++;
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= n; ++j)
        if (i > j) id[i][j] = id[j][i];
    for (int i = 1; i <= n; ++i) {
      for (int j = 1; j <= n; ++j)
        if (i == j)
          printf("0 ");
        else
          printf("%lld ", 1ll << id[i][j]);
      puts("");
    }
    return 0;
  }
  return 0;
}
