#include <iostream>
using namespace std;

class Yoba
{
public:
	Yoba()
	{
		
	}
	
	~Yoba()
	{
		std::cout << "Destructed: " << this << std::endl;
	}
	
	Yoba * method()
	{
		Yoba * ref = new Yoba();
		return ref;
	}
	
	void show()
	{
		std::cout << "123" << std::endl;
	}
	
};

int main() {
	// your code goes here
	Yoba y;
	Yoba * r = y.method();
	r->show();
	delete r;
	r->show();
	return 0;
}