#include <iostream>
using namespace std;
class A {
protected:
    int x = 5 ;
};

class B {
protected:
    int x = 42 ;
};

class C : public A, public B {
protected:
    using B::x;

public:
    int foo(void) { return x; }
    int fooa(void) { return A::x; }
     int foob(void) { return B::x; }
};
int main() {
	C c;
	std::cout<<c.foo()<<std::endl;
	std::cout<<c.fooa()<<std::endl;
	std::cout<<c.foob()<<std::endl;
	return 0;
}