#include <cstdio>
#include <iostream>
using namespace std;
class A
{
public:
A() { cout << 1; }
~A() { cout << 2; }
};
class B
{
public:
B() { cout << 3; }
~B() { cout << 4; }
protected:
A m_member1;
};
class C : public B
{
public:
C() { cout << 5; }
~C() { cout << 6; }
private:
A m_member2;
};
int main()
{
C c; // output: 13156242
return 0;
}