#include<iostream>

#define REP(i,j,k) for(int i=j;i<=k;++i)
int A[9]={1,2,4,7,12,20,29,38,52}; long long B[11][11],N;

int main(){
	std::cin>>N; long long MX=1;
	REP(i,2,N){REP(j,1,i-1){B[i][j]=B[j][i]=MX*A[j - 1];}MX+=B[i][i-1]+B[i][i-2]-B[i-1][i-2];}
	REP(i,1,N) REP(j,1,N) std::cout << B[i][j] << " \n"[j == N];
}