class A {
public void m1(){
mx();
}
public static void main
(String[] args
){
try {
A a = ( B) new C();
a.m1();
B b = (B) new A();
b.m1();
e.
printStackTrace(System.
out); }
}
public void mx(){
}
}
class B extends A{
public void mx(){
}
}
class C extends B {
public void mx(){
}
}
Y2xhc3MgQSB7CgpwdWJsaWMgdm9pZCBtMSgpewogICAgbXgoKTsKfQoKcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncyl7CgogICAgdHJ5IHsKICAgICAgICBBIGEgPSAoIEIpIG5ldyBDKCk7IAogICAgICAgIGEubTEoKTsKICAgICAgICBCIGIgPSAoQikgbmV3IEEoKTsgCiAgICAgICAgYi5tMSgpOwogICAgfSBjYXRjaCAoRXhjZXB0aW9uIGUpIHsKICAgICAgICBlLnByaW50U3RhY2tUcmFjZShTeXN0ZW0ub3V0KTsKICAgIH0KfQoKcHVibGljIHZvaWQgbXgoKXsgCiAgICAgU3lzdGVtLm91dC5wcmludCgxMCk7Cn0KfQoKCmNsYXNzIEIgZXh0ZW5kcyBBewpwdWJsaWMgdm9pZCBteCgpewogICAgU3lzdGVtLm91dC5wcmludCgzMCk7Cn0KfQoKY2xhc3MgQyBleHRlbmRzIEIgewpwdWJsaWMgdm9pZCBteCgpewogICAgU3lzdGVtLm91dC5wcmludCg0MCk7Cn0KfQ==