/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
A1 a1 = new A1();
A2 a2 = new A2();
print(a1, "asdfasdf");
print(a2, "xcvxcv");
}
public static void print
(A1 a1,
String str
) { System.
out.
println("Hey a1!" + str
); }
public static void print
(A2 a2,
String str
) { System.
out.
println("Hey a2!" + str
); }
public static class A {}
public static class A1 extends A {}
public static class A2 extends A {}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCUExIGExID0gbmV3IEExKCk7CgkJQTIgYTIgPSBuZXcgQTIoKTsKCQkKCQlwcmludChhMSwgImFzZGZhc2RmIik7CgkJcHJpbnQoYTIsICJ4Y3Z4Y3YiKTsKCX0KCQoJcHVibGljIHN0YXRpYyB2b2lkIHByaW50KEExIGExLCBTdHJpbmcgc3RyKSB7CgkJU3lzdGVtLm91dC5wcmludGxuKCJIZXkgYTEhIiArIHN0cik7Cgl9CgkKCXB1YmxpYyBzdGF0aWMgdm9pZCBwcmludChBMiBhMiwgU3RyaW5nIHN0cikgewoJCVN5c3RlbS5vdXQucHJpbnRsbigiSGV5IGEyISIgKyBzdHIpOwoJfQoJCglwdWJsaWMgc3RhdGljIGNsYXNzIEEge30KCQoJcHVibGljIHN0YXRpYyBjbGFzcyBBMSBleHRlbmRzIEEge30KCQoJcHVibGljIHN0YXRpYyBjbGFzcyBBMiBleHRlbmRzIEEge30KfQ==