/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
public class Main {
public static void main
(String args
[]) {
A.foo(); // foo from A
A.bar(); // foo from A
B.foo(); // foo from B
B.bar(); // foo from A <- ???
}
}
class A
{
public static void foo() {
System.
out.
println("foo from A"); }
public static void bar() {
foo();
}
}
class B extends A
{
public static void foo() {
System.
out.
println("foo from B"); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpwdWJsaWMgY2xhc3MgTWFpbiB7CiAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nIGFyZ3NbXSkKICB7CiAgICBBLmZvbygpOyAvLyBmb28gZnJvbSBBCiAgICBBLmJhcigpOyAvLyBmb28gZnJvbSBBCiAgICBCLmZvbygpOyAvLyBmb28gZnJvbSBCCiAgICBCLmJhcigpOyAvLyBmb28gZnJvbSBBICAgICAgPC0gID8/PwogIH0KfQogCmNsYXNzIEEKewogIHB1YmxpYyBzdGF0aWMgdm9pZCBmb28oKSB7CiAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiZm9vIGZyb20gQSIpOwogIH0KIAogIHB1YmxpYyBzdGF0aWMgdm9pZCBiYXIoKSB7CiAgICAgIGZvbygpOwogIH0KfQogCmNsYXNzIEIgZXh0ZW5kcyBBCnsKICBwdWJsaWMgc3RhdGljIHZvaWQgZm9vKCkgewogICAgICBTeXN0ZW0ub3V0LnByaW50bG4oImZvbyBmcm9tIEIiKTsKICB9Cn0K