import java.util.*;
interface Showable
{
}
class Int implements Showable
{
private int n;
public Int(int nn)
{
n = nn;
}
{
}
}
class Person implements Showable
{
private int age;
public Person
(String n,
int a
) {
name = n;
age = a;
}
{
return "name: " + name
+ "age: " + Integer.
toString(age
); }
}
class Ideone
{
{
List<Showable> lsh = new ArrayList<Showable>();
lsh.add(new Int(42));
lsh.add(new Person("Jhon Doe", 22));
}
}
aW1wb3J0IGphdmEudXRpbC4qOwoKaW50ZXJmYWNlIFNob3dhYmxlCnsKCXB1YmxpYyBTdHJpbmcgc2hvdygpOwkKfQoKY2xhc3MgSW50IGltcGxlbWVudHMgU2hvd2FibGUgCnsKCXByaXZhdGUgaW50IG47CgkKCXB1YmxpYyBJbnQoaW50IG5uKQoJewoJCW4gPSBubjsKCX0KCQoJcHVibGljIFN0cmluZyBzaG93KCkKCXsKCQlyZXR1cm4gSW50ZWdlci50b1N0cmluZyhuKTsKCX0KfQoKY2xhc3MgUGVyc29uIGltcGxlbWVudHMgU2hvd2FibGUgCnsKCXByaXZhdGUgU3RyaW5nIG5hbWU7CgkKCXByaXZhdGUgaW50IGFnZTsKCQoJcHVibGljIFBlcnNvbihTdHJpbmcgbiwgaW50IGEpCgl7CgkJbmFtZSA9IG47CgkJYWdlID0gYTsKCX0KCQoJcHVibGljIFN0cmluZyBzaG93KCkKCXsKCQlyZXR1cm4gIm5hbWU6ICIgKyBuYW1lICsgImFnZTogIiArIEludGVnZXIudG9TdHJpbmcoYWdlKTsKCX0KfQoKY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCUxpc3Q8U2hvd2FibGU+IGxzaCA9IG5ldyBBcnJheUxpc3Q8U2hvd2FibGU+KCk7CgkJbHNoLmFkZChuZXcgSW50KDQyKSk7CgkJbHNoLmFkZChuZXcgUGVyc29uKCJKaG9uIERvZSIsIDIyKSk7Cgl9Cn0K