What will be the output of the following program?
public class Kashmir {
public static void main(String[] args) {
try {
KanyaKumari kk = new KanyaKumari();
kk.run();
p('A');
kk.start();
kk.join();
p('H');
kk.run();
p('M');
kk.start();
p('B');
} catch (Exception ex) {
p('I');
}
p('R');
}
private static void p(char c) {
System.out.print(c);
}
}
class KanyaKumari extends Thread {
String s = "KSMI";
static int i = 0;
public void run() {
System.out.print(s.charAt(i++));
}
}