Problem: Volodya has recently visited a very odd town. There are N tourist attractions in the town and every two of them are connected by a bidirectional road. Each road has some travel price (natural number) assigned to it and all prices are distinct. But the most striking thing about this town is that each city sightseeing tour has the same total price! That is, if we choose any city sightseeing tour — a cycle which visits every attraction exactly once — the sum of the costs of the tour roads is independent of the tour. Volodya is curious if you can find such price system with all road prices not greater than 1000.

Input

Input contains just one natural number (3 ≤ N ≤ 20) — the number of town attractions.

Output

Output should contain N rows containing N positive integer numbers each — the adjacency matrix of the prices graph (thus, j-th number in i-th row should be equal to the price of the road between the j-th and the i-th attraction). Diagonal numbers should be equal to zero. All numbers should not be greater than 1000. All prices should be positive and pairwise distinct. If there are several solutions, output any of them.

Examples

Input

3


Output

0 3 4 
3 0 5 
4 5 0 

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;

public class Solution
{
PrintWriter out;
BufferedReader in;
StringTokenizer ss;


   void dbg(String s){System.out.println(s);};

   String next_token() throws IOException
   {while (!ss.hasMoreTokens())ss=new StringTokenizer(in.readLine());
    return ss.nextToken();}

   Double _double() throws IOException
   {return Double.parseDouble (next_token());}

   int _int() throws IOException
   {return Integer.parseInt (next_token());}

   long _long() throws IOException
   {return Long.parseLong (next_token());}


void run()throws IOException
{
in = new BufferedReader(new InputStreamReader(System.in));
out= new PrintWriter(System.out);
int F[]=new int[20];
    F[0]=1;
    F[1]=2;
ss = new StringTokenizer("  ");
//out.println("D");

/*for(int n=3;n<21;n++){
    F[n-1]=F[n-2];boolean ok=false;

    while(!ok){F[n-1]++;
        int B[]=new int[2000];
       int m=0;
     for(int i=0;i<n;i++)
     for(int j=i+1;j<n;j++){
           if(i!=j){
           int x=F[i]+F[j];B[x]++;
               //out.println(x);
               m=Math.max(B[x],m);
               //m=2;
           } 
         
     }
    if(m==1)ok=true;
    }
}  */
    F[0]=1;
    F[1]=2;
    F[2]=3;
    F[3]=5;
    F[4]=8;
    F[5]=13;
    F[6]=21;
    F[7]=30;
    F[8]=39;
    F[9]=53;
    F[10]=74;
    F[11]=95;
    F[12]=128;
    F[13]=152;
    F[14]=182;
    F[15]=212;
    F[16]=258;
    F[17]=316;
    F[18]=374;
    F[19]=413;
    
    //for(int i=0;i<20;i++)out.print(F[i]+" ");
     //out.println();out.println();

    int N=_int();
    for(int i=0;i<N;i++){
      for(int j=0;j<N;j++){
       if(i==j)out.print(0+" ");
          else{
           out.print(F[i]+F[j]+" ");
          }
      }
      out.println();
    }
  //  for(int i=0;i<1000;i++)if(C[i]>2)out.println("!!!");
    //for(int i=0;i<20;i++)out.println("F["+i+"]="+F[i]+";");
out.close();
}

public static void main(String[] args)throws Exception
{
try{new Solution().run();}catch (Exception e){System.out.println("Runtime Error");};
}
}