#include <iostream>
using namespace std;
class C {
public:
C() : m_i(6) { cout << "A:" << m_i << endl;}
C(int i_) : m_i(i_) { cout << "B:" << m_i << endl;}
~C() {cout << "C:" << m_i << endl;}
private:
int m_i;
};
int main(int argc, char* argv[]) {
cout << "X\n";
C* c = new C;
C stackC;
cout << "Y\n";
delete c;
cout << "Z\n";
}
ICAgICNpbmNsdWRlIDxpb3N0cmVhbT4KCiAgICB1c2luZyBuYW1lc3BhY2Ugc3RkOwoKICAgIGNsYXNzIEMgewogICAgcHVibGljOgogICAgICAgIEMoKSA6IG1faSg2KSB7IGNvdXQgPDwgIkE6IiA8PCBtX2kgPDwgZW5kbDt9CgogICAgICAgIEMoaW50IGlfKSA6IG1faShpXykgeyBjb3V0IDw8ICJCOiIgPDwgbV9pIDw8IGVuZGw7fQoKICAgICAgICB+QygpIHtjb3V0IDw8ICJDOiIgPDwgbV9pIDw8IGVuZGw7fQogICAgcHJpdmF0ZToKICAgICAgICBpbnQgbV9pOwogICAgfTsKCiAgICBpbnQgbWFpbihpbnQgYXJnYywgY2hhciogYXJndltdKSB7CiAgICAgICAgY291dCA8PCAiWFxuIjsKICAgICAgICBDKiBjID0gbmV3IEM7CiAgICAgICAgQyBzdGFja0M7CiAgICAgICAgY291dCA8PCAiWVxuIjsKICAgICAgICBkZWxldGUgYzsKICAgICAgICBjb3V0IDw8ICJaXG4iOwogICAgfQo=