#include <iostream>
 
using namespace std;
 
struct A {};
struct B : A {};
struct C : A {};
struct D : B, C {};
 
int main() {
    
    D * d = new D;
    
    B * b = d;
    C * c = d;
    
    A *a[5];
    a[0] = b;
    a[1] = c;
    
    cout << (a[0] == a[1]) << endl;
}
