#include <iostream>
using namespace std;
struct A {};
struct B : A {};
class C {};
class D1 : C {};
class D2 : public C {};
void test_A(A&) {}
void test_C(C&) {}
int main() {
B b;
test_A(b); // OK.
D1 d1;
D2 d2;
//test_C(d1); // FAIL: inaccessible base.
test_C(d2); // OK.
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKc3RydWN0IEEge307CnN0cnVjdCBCIDogQSB7fTsKCmNsYXNzIEMge307CmNsYXNzIEQxIDogQyB7fTsKY2xhc3MgRDIgOiBwdWJsaWMgQyB7fTsKCnZvaWQgdGVzdF9BKEEmKSB7fQp2b2lkIHRlc3RfQyhDJikge30KCmludCBtYWluKCkgewoJQiBiOwoJdGVzdF9BKGIpOyAvLyBPSy4KCQoJRDEgZDE7CglEMiBkMjsKCQoJLy90ZXN0X0MoZDEpOyAvLyBGQUlMOiBpbmFjY2Vzc2libGUgYmFzZS4KCXRlc3RfQyhkMik7IC8vIE9LLiAKCQoJcmV0dXJuIDA7Cn0=