#include <bits/stdc++.h>
int D[30] = {0,   2,   3,   4,   8,   13,  20,  27,  41,  56,  71,
             101, 132, 158, 193, 215, 265, 297, 329, 375, 437, 496};
int main() {
  int i, j, n;
  scanf("%d", &n);
  for (i = 0; i < n; ++i)
    for (j = 0; j < n; ++j)
      printf("%d%c", (i == j) ? 0 : D[i] + D[j], (j == n - 1) ? '\n' : ' ');
  return 0;
}
