For this Question: Given two integers N and K. Construct a max diversity string of length N and period K. Among all possible strings, find the lexographically minimum string.
A max diverse string is a string with maximum number of different characters.
A string with period K is a string made by a string of length K repeated multiple times.
Note: You can use only lowercase characters from 'a' to 'z'.The first and the only line of input contains two integers N and K.

Constraints:
1 <= N <= 100000
1 <= K <= min(N,100)
N is divisible by K.Print the required string.Sample Input 1
4 2

Sample Output 1
abab

Sample Input 2
4 1

Sample Output 2
aaaa, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) {
        Scanner s = new Scanner(System.in);
		int n = s.nextInt(), k = s.nextInt();
		int a = 0, b = k;
		if(k > 26){
			a = k - 26;
			b = 26;
		}
		while(n != 0){
			for(int i=0 ; i<a ; i++){
				System.out.print((char)(97));
				n--;
			}
			for(int i=0 ; i<b ; i++){
				System.out.print((char)(i%26+97));
				n--;
			}
		}
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?