#include<iostream>
using namespace std;

class A
{
private:
    int a,b;
public:
    A(int a, int b)
    {
        this->a=a;
        this->b=b;
    }
    void setVar(int a,int b)
    {
        this->a=a;
        this->b=b;
    }
    int getA()
    {
        return a;
    }
    int getB()
    {
        return b;
    }
};
class B
{
private:
    string s1;
protected:
    double d;
public:
    B(string s1,double d)
    {
        this->s1=s1;
        this->d=d;
    }
    void setVar2(string s1,double d)
    {
        this->s1=s1;
        this->d=d;
    }
    string getS1()
    {
        return s1;
    }
    double getD()
    {
        return d;
    }
};

class C: private A, protected B
{
public:
    string s2;
    C(int a, int b,string s1, double d,string s2): A(a,b),B(s1,d)
    {
        this->s2=s2;
    }
    void setDelVar(int a,int b,string s1,double d)
    {
        setVar(a,b);
        setVar2(s1,d);
    }
    int getDelA()
    {
        return getA();
    }
    int getDelB()
    {
        return getB();
    }
    string getDelS1()
    {
        return getS1();
    }
    double getDelD()
    {
        return getD();
    }
    string getS2()
    {
        return s2;
    }

};

class D: public C
{
public:
    D(int a,int b,string s1,double d, string s2): C(a,b,s1,d,s2)
    {}
};

void display(D d)
{
    cout<<d.getDelA()<<" "<<d.getDelB()<<" "<<d.getDelS1()<<" "<<d.getDelD()<<" "<<d.getS2()<<endl;
}

int main()
{

    D d(5,6,"s",7.8,"ss");
    display(d);
}


