Scanner sc =new Scanner (System.in);
int n =sc.nextInt();
for(int i =1;i<=n;i++){
for(int j =1;j<=i;j++){
if(j==1||i==j){
System.out.print("1 ");
}else{
if(i%2==1){
System.out.print("1 ");
}else{
System.out.print("0 ");
}
}
}
System.out.println();
}
}
}