#include <iostream>
using namespace std;
class A {
int x;
public:
A() { x = 1; cout << "A"; }
};
class B : virtual public A {
int y;
public:
B() { y = 2; cout << "B"; }
};
class C : virtual public B, virtual public A {
int z;
public:
C() { z = 3; cout <<"C"; }
};
class D : public A, public B, public C {
int t;
public:
D() { t = 4; cout << "D"; }
};
int main()
{
D d;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmNsYXNzIEEgewogICAgaW50IHg7CnB1YmxpYzoKICAgICAgICBBKCkgeyB4ID0gMTsgY291dCA8PCAiQSI7IH0KfTsKY2xhc3MgQiA6IHZpcnR1YWwgcHVibGljIEEgewogICAgICAgIGludCB5OwpwdWJsaWM6CiAgICAgICAgQigpIHsgeSA9IDI7IGNvdXQgPDwgIkIiOyB9Cn07CmNsYXNzIEMgOiB2aXJ0dWFsIHB1YmxpYyBCLCB2aXJ0dWFsIHB1YmxpYyBBIHsKICAgICAgICBpbnQgejsKcHVibGljOgogICAgICAgIEMoKSB7IHogPSAzOyBjb3V0IDw8IkMiOyB9Cn07CmNsYXNzIEQgOiBwdWJsaWMgQSwgcHVibGljIEIsIHB1YmxpYyBDIHsKICAgICAgICBpbnQgdDsKcHVibGljOgogICAgICAgIEQoKSB7IHQgPSA0OyBjb3V0IDw8ICJEIjsgfQp9OwppbnQgbWFpbigpCnsKICAgICAgICBEIGQ7CiAgICAgICAgcmV0dXJuIDA7Cn0=