public class Main {
public static void main
(String[] args
) { System.
out.
println("main - begin"); new A();//just for start initialization
System.
out.
println("main - end"); }
}
class A {
static {
System.
out.
println("A - begin"); B.test();
System.
out.
println("A - end"); }
static void test() {
}
}
class B {
static {
System.
out.
println("B - begin"); A.test();
System.
out.
println("B - end"); }
static void test() {
}
}
cHVibGljIGNsYXNzIE1haW4gewogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewoJCVN5c3RlbS5vdXQucHJpbnRsbigibWFpbiAtIGJlZ2luIik7CiAgICAgICAgbmV3IEEoKTsvL2p1c3QgZm9yIHN0YXJ0IGluaXRpYWxpemF0aW9uCgkJU3lzdGVtLm91dC5wcmludGxuKCJtYWluIC0gZW5kIik7CiAgICB9Cn0KCmNsYXNzIEEgewogICAgc3RhdGljIHsKCQlTeXN0ZW0ub3V0LnByaW50bG4oIkEgLSBiZWdpbiIpOwogICAgICAgIEIudGVzdCgpOwoJCVN5c3RlbS5vdXQucHJpbnRsbigiQSAtIGVuZCIpOwogICAgfQoKICAgIHN0YXRpYyB2b2lkIHRlc3QoKSB7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJBIik7CiAgICB9Cn0KCmNsYXNzIEIgewogICAgc3RhdGljIHsKCQlTeXN0ZW0ub3V0LnByaW50bG4oIkIgLSBiZWdpbiIpOwogICAgICAgIEEudGVzdCgpOwoJCVN5c3RlbS5vdXQucHJpbnRsbigiQiAtIGVuZCIpOwogICAgfQoKICAgIHN0YXRpYyB2b2lkIHRlc3QoKSB7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJCIik7CiAgICB9Cn0=