Code to be written in subsequent rows

I am not able to initialize the code and the subsequent rows.

hey @souradipbiswas27
public class Main {

public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int n = s.nextInt();
	int i, j;

	for (i = 1; i <= n; i++) {
		if(i==1) {
			System.out.println(1);
			continue;
		}
		for (j = 1; j <= i; j++) {
			if (j == 1 || j == i)
				System.out.print(i-1);
			else
				System.out.print(0);
		}
		System.out.println();
	}

}

}