class BaseClass { public BaseClass(String s) { System.out.print("B"); } } public class MainClass extends BaseClass { public MainClass(String s) { System.out.print("D"); } public static void main(String[] args) { new MainClass("C"); System.out.println(" "); } }