Scanner scn = new Scanner(System.in);
int n=scn.nextInt();
int row=1;
while(row<=n) {
for(int i=1;i<=row;i++) {
if(row<=n/2) {
System.out.print(“1”);
}
else {
if(i>1&&i<row) {
System.out.print("0");
}
else {
int row1=row-1;
System.out.print(row1);
}
}
System.out.println();
row=row+1;
}
}
}
}