#include <iostream>
using std::cout;
using std::endl;

class Base {
protected:
    int x;
    int y;
public:
    Base(int y) : y(y) {};
    int getX() {
        return x;
    }
};

class Derived : public Base {
public:
    Derived(int y) : Base(y) { x = 40; }  
};

int main() {
    Derived d(10);
    cout << d.getX() << endl;
    return 0;
}