#include <iostream> 
#include <string>      
using namespace std;

class MyShape
{
	public:
		MyShape()
		{
			cout << 1 << endl;
		}
		~MyShape()
		{
			cout << 4 << endl;
		}
};
class MyRectangle : public MyShape
{
	public:
		MyRectangle()
		{
			cout << 2 << endl;
		}
		~MyRectangle()
		{
			cout << 3 << endl;
		}
};

int main()
{
	MyRectangle R1; 
}

