#include <iostream>
using namespace std;

struct RAII {
	int n;
	RAII(int n) : n(n) { std::cout << "ctor " << n << '\n'; }
	RAII(RAII &&x) { n = x.n; x.n = -1; std::cout << "move " << n << '\n'; }
	~RAII() { std::cout << "dtor " << n << '\n'; }
};

int main() {
	RAII x(1);
	RAII *y = new RAII(std::move(x));
	return 0;
}