class A {
	private int x=1;
	static int y;
	public A() { this(2); y++; }
	public A(int x) { this.x = x; }
	public A(int x, int y) { this.x = x; A.y = y; }
	public void f() { System.out.println("A:f:"+x+","+y); inc(); }
	private void inc() { x++; y++; }
}

class B{
	int x=7;
	public void f(A a){ a.f(); }
	public void g(B b){ b.f(); }
	public static void main(String [] args){
		System.out.println(x++);
		A a1 = new A();
		a1.f();
		A a2 = new A(2,3);
		a1.f();
		a2.f();
		B b1 = new A(2);
		B b2 = new B();
		f(a1);
		b2.f(a2);
	}
}
