#include <iostream>

class Base
{
protected:
    int x;
    std::string s;

public:
    Base() = default;
    Base(int x, std::string s)
    {
        this->x = x;
        this->s = s;

        std::cout << "Constuctor in Base Class Called" << std::endl;
    }

    int getX()
    {
        return x;
    }

    std::string getS()
    {
        return s;
    }

    ~Base()
    {
        std::cout << "Destructor in Base Class" << std ::endl;
    }
};

class Derived : public Base
{
private:
    int z;

public:
    Derived() = default;

    Derived(int x, std::string s, int z) : Base(x, s)
    {
        this->z = z;
        std::cout << "Constuctor in Derived Class Called" << std::endl;
    }

    int getZ()
    {
        return z;
    }

    void display()
    {
        std::cout << getX() << getS() << z << std::endl;
    }

    ~Derived()
    {
        std::cout << "Destructor in Derived Class" << std::endl;
    }
};

int main()
{

    Derived d(5, "Hello", 55);
    d.display();
    return 0;
}