class A { 
	public void a() {System.out.println("Aa"); }
	void b(B b) {System.out.println("Ab(B)");}

	void c() {System.out.println("Ac");}
	void c(A a) {System.out.println("Ac(A)"); }

	static void d() {System.out.println("static Ad");}

	protected void e() {System.out.println("Ae");}
	private void f() {System.out.println("Af");}
	//public void printF() { f(); }

	Object g() {System.out.println("Ag"); return 2;}
	int h() {System.out.println("Ah"); return 2;}
	void i() {System.out.println("Ai");}

	void j() throws Exception {System.out.println("Aj");  }
	void k() throws IOException {System.out.println("Ak");  }
	void l() throws Exception {System.out.println("Al");  }
	void m() throws Exception, ArrayIndexOutOfBoundsException {System.out.println("Am");  }

}
class B extends A{
	public void a() {System.out.println("Ba"); }

	protected void b(B b) {System.out.println("Bb(B)");}

	public void c(A a) {System.out.println("Bc(A)");}
	void c(B b) {System.out.println("Bc(B)"); }

	static void d() {System.out.println("static Bd");}
	static void d(A a) {System.out.println("Bd(A a)");}

	private void e() {System.out.println("Be");}
	protected void f() {System.out.println("Bf");}

	String g() {System.out.println("Bg"); return "c";}
	char h() {System.out.println("Bh"); return 'c';}
	int i() {System.out.println("Bi"); return 3; }

	void j() throws IOException {System.out.println("Bj");  }
	void k() throws Exception {System.out.println("Bk");  }
	void l() {System.out.println("Bl");}
	void m() throws IOException, IllegalArgumentException {System.out.println("Bm");  }

}
public class Main {
	public static void main(String[] args) throws Exception {
		A a = new A();
		A ab = new B();
		B b = new B();

		a.a();
		ab.a();
		b.a();
		((A)ab).a();
		ab.b(null);

		ab.c();
		ab.c(a);
		ab.c(ab);
		ab.c(b);

		a.d();
		ab.d();

		a.printF();
		ab.printF();

		ab.j();
		ab.k();
		ab.l();
		ab.m();
	}
}