#include <iostream>
struct B
{
int x;
virtual ~B(){}
};
struct C
{
C()
{
dynamic_cast<B &>(*this).x = 7;
}
virtual ~C(){}
};
struct A : virtual B, virtual C
{
A() : B(), C()
{
std::cout << B::x << std::endl;
}
virtual ~A(){}
};
int main()
{
A a;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKc3RydWN0IEIKewogICAgaW50IHg7CiAgICB2aXJ0dWFsIH5CKCl7fQp9OwoKc3RydWN0IEMKewogICAgQygpCiAgICB7CiAgICAgICAgZHluYW1pY19jYXN0PEIgJj4oKnRoaXMpLnggPSA3OwogICAgfQogICAgdmlydHVhbCB+Qygpe30KfTsKc3RydWN0IEEgOiB2aXJ0dWFsIEIsIHZpcnR1YWwgQwp7CiAgICBBKCkgOiBCKCksIEMoKQogICAgewogICAgICAgIHN0ZDo6Y291dCA8PCBCOjp4IDw8IHN0ZDo6ZW5kbDsKICAgIH0KICAgIHZpcnR1YWwgfkEoKXt9Cn07CgppbnQgbWFpbigpCnsKICAgIEEgYTsKfQo=