#include <iostream>
using namespace std;
class X{
public:
int id;
X(int id){
this->id = id;
}
~X(){
cout << "destroying " << id << endl;
}
};
int main(){
X a(1);
a = X(2);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmNsYXNzIFh7CnB1YmxpYzoKICAgIGludCBpZDsKICAgIFgoaW50IGlkKXsKICAgICAgICB0aGlzLT5pZCA9IGlkOwogICAgfQogICAgflgoKXsKICAgICAgICBjb3V0IDw8ICJkZXN0cm95aW5nICIgPDwgaWQgPDwgZW5kbDsKICAgIH0KCn07CgoKCmludCBtYWluKCl7CgoKICAgIFggYSgxKTsKICAgIGEgPSBYKDIpOwoKCiAgICByZXR1cm4gMDsKCn0=