#include <iostream>
using namespace std;

class Mammal {
public:
	Mammal() {
		cout << "Mammal constructor" << endl; 
	}
	
	virtual ~Mammal() {
		cout << "Mammal destructor" << endl;
	}
};

class Dog : public Mammal {
public:
	Dog() {
		cout << "Dog constructor" << endl;
	}
	
	virtual ~Dog() {
		cout << "Dog destructor" << endl;
	}
	
	void speak() {
		cout << "wang wang" << endl;
	}
};

void creating() {
	Dog dog;
	dog.speak();
}

int main() {
	creating();
	
	return 0;
}