import java.util.* ;
import java.lang.* ;
import java.io.* ;
class Ideone {
interface TestInterface < U> {
void test ( U u) ;
}
static class Test < T extends Test< T>> implements TestInterface< T> {
@Override public void test ( T t) {
}
}
static class TestA extends Test< TestA> { }
static class TestB extends Test< TestB> { }
try {
Test a = new TestA( ) ;
Test b = new TestB( ) ;
a.test ( b) ;
x.
printStackTrace ( System .
out ) ; }
try {
TestInterface a = new TestA( ) ;
Test b = new TestB( ) ;
a.test ( b) ;
x.
printStackTrace ( System .
out ) ; }
try {
TestInterface a = new TestA( ) ;
TestInterface b = new TestB( ) ;
a.test ( b) ;
x.
printStackTrace ( System .
out ) ; }
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBJZGVvbmUgewoJCiAgICBpbnRlcmZhY2UgVGVzdEludGVyZmFjZSA8VT4gewogICAgICAgIHZvaWQgdGVzdCAoVSB1KTsKICAgIH0KICAgIAogICAgc3RhdGljIGNsYXNzIFRlc3QgPFQgZXh0ZW5kcyBUZXN0PFQ+PiBpbXBsZW1lbnRzIFRlc3RJbnRlcmZhY2U8VD4gewogICAgICAgIEBPdmVycmlkZSBwdWJsaWMgdm9pZCB0ZXN0IChUIHQpIHsKICAgICAgICAgICAgdGhyb3cgbmV3IFJ1bnRpbWVFeGNlcHRpb24oIk15IGV4Y2VwdGlvbiIpOwogICAgICAgIH0KICAgIH0KICAgIAogICAgc3RhdGljIGNsYXNzIFRlc3RBIGV4dGVuZHMgVGVzdDxUZXN0QT4geyB9CiAgICBzdGF0aWMgY2xhc3MgVGVzdEIgZXh0ZW5kcyBUZXN0PFRlc3RCPiB7IH0KICAgIAogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBFeGNlcHRpb24gewogICAgICAgIAogICAgICAgIHRyeSB7CiAgICAJICAgIFRlc3QgYSA9IG5ldyBUZXN0QSgpOwoJICA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