#include <iostream>
#include <iomanip>

using namespace std;

struct A { int a; };
struct B { int b; };
struct C { int c; };

struct ABC
    : public A
    , public B
    , public C
{
    int abc;
};

int main()
{
	ABC* abc = new ABC;
	cout << "abc: " << abc << endl;
	A* a = static_cast<A*>(abc);
	cout << "a: " << a << endl;
	B* b = static_cast<B*>(abc);
	cout << "b: " << b << endl;
	C* c = static_cast<C*>(abc);
	cout << "c: " << c << endl;
}