#include <bits/stdc++.h>
using namespace std;
int a[] = {1, 2, 4, 7, 12, 20, 29, 38, 52, 73};
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      printf(j == n ? "%d\n" : "%d ", i == j ? 0 : a[i - 1] + a[j - 1]);
}
