import java.util.*;
class Ideone {
public static void main
(String[] args
) { add(new Player("Vova"));
add(new YourEX("Vika"));
add(new YourEX("Masha"));
add(new YourEX("Dasha"));
add(new Player("Pasha"));
add(new Player("Petya"));
}
private static void add(StaticEntity s) {
System.
out.
print(s.
getName()); System.
out.
println(" is Static"); }
private static void add(DynamicEntity entity) {
System.
out.
print(entity.
getName()); System.
out.
println(" is Dynamic"); }
}
interface StaticEntity
extends Entity {} interface DynamicEntity
extends Entity {}
static class BaseEntity
implements Entity {
public BaseEntity
(String name
) { this.name = name;
}
@Override
return name;
}
}
static class Player extends BaseEntity implements DynamicEntity {
super(name);
}
}
static class YourEX extends BaseEntity implements StaticEntity {
super(name);
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwoKY2xhc3MgSWRlb25lIHsKCQoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpCXsKCQlhZGQobmV3IFBsYXllcigiVm92YSIpKTsKCQlhZGQobmV3IFlvdXJFWCgiVmlrYSIpKTsKCQlhZGQobmV3IFlvdXJFWCgiTWFzaGEiKSk7CgkJYWRkKG5ldyBZb3VyRVgoIkRhc2hhIikpOwoJCWFkZChuZXcgUGxheWVyKCJQYXNoYSIpKTsKCQlhZGQobmV3IFBsYXllcigiUGV0eWEiKSk7Cgl9CgkKCXByaXZhdGUgc3RhdGljIHZvaWQgYWRkKFN0YXRpY0VudGl0eSBzKSB7CgkJU3lzdGVtLm91dC5wcmludChzLmdldE5hbWUoKSk7CgkJU3lzdGVtLm91dC5wcmludGxuKCIgaXMgU3RhdGljIik7Cgl9CgkKCXByaXZhdGUgc3RhdGljIHZvaWQgYWRkKER5bmFtaWNFbnRpdHkgZW50aXR5KSB7CgkJU3lzdGVtLm91dC5wcmludChlbnRpdHkuZ2V0TmFtZSgpKTsKCQlTeXN0ZW0ub3V0LnByaW50bG4oIiBpcyBEeW5hbWljIik7Cgl9CgkKCWludGVyZmFjZSBFbnRpdHkgewoJCVN0cmluZyB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