#include <iostream>
#include <memory> //yeehaww!
//using namespace std; //для пидоров
class Yoba
{
public:
Yoba()
{
}
~Yoba()
{
std::cout << "Destructed: " << this << std::endl;
}
std::shared_ptr<Yoba> method()
{
return std::make_shared<Yoba>();
}
void show()
{
std::cout << "123" << std::endl;
}
};
int main() {
// your code goes here
Yoba y;
auto r = y.method();
r->show();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWVtb3J5PiAvL3llZWhhd3chCi8vdXNpbmcgbmFtZXNwYWNlIHN0ZDsgLy/QtNC70Y8g0L/QuNC00L7RgNC+0LIKCmNsYXNzIFlvYmEKewpwdWJsaWM6CglZb2JhKCkKCXsKCQkKCX0KCQoJfllvYmEoKQoJewoJCXN0ZDo6Y291dCA8PCAiRGVzdHJ1Y3RlZDogIiA8PCB0aGlzIDw8IHN0ZDo6ZW5kbDsKCX0KCQoJc3RkOjpzaGFyZWRfcHRyPFlvYmE+IG1ldGhvZCgpCgl7CgkJcmV0dXJuIHN0ZDo6bWFrZV9zaGFyZWQ8WW9iYT4oKTsKCX0KCQoJdm9pZCBzaG93KCkKCXsKCQlzdGQ6OmNvdXQgPDwgIjEyMyIgPDwgc3RkOjplbmRsOwoJfQoJCn07CgppbnQgbWFpbigpIHsKCS8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCVlvYmEgeTsKCWF1dG8gciA9IHkubWV0aG9kKCk7CglyLT5zaG93KCk7CglyZXR1cm4gMDsKfQ==