import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        // your code goes here
        for(int m=1;m<n;m++){
            for (int r=1;r<n;r++){
                int a=m,b=r,x1=0,y1=0,xd=n-1,yd=n-1;
                int[] ar = new int[2];
                ar[0]=0;
                ar[1]=0;
            
                int count=1;
        
                boolean run=true;
                while(run){
                    ar=findnewcoordinates(ar,a,b,n);
                    if(ar[0]==xd &&ar[1]==yd){
                        run=false;  
                    }
                    else if (ar[0]==-1){
                       run=false;
                       count=-1;
                    }else
                        count++;
            
             }
             System.out.print(count + " "); 
                 }
                 System.out.println();
        }
        
    }
    public static int[] findnewcoordinates(int[] ar,int a,int b,int n){
        ar[0]=newcoords(ar[0],a,n);
        ar[1]=newcoords(ar[1],b,n);
        
        return ar;
        }
    
    public static int newcoords(int currcoord,int a,int n){
        int nwcoord;
        if(currcoord+a < n)
            nwcoord=currcoord+a;
        else if(currcoord-a > 0)
            nwcoord=currcoord-a;
        else
            nwcoord=-1;
        return nwcoord;
    }
        
}