#include <iostream>
using namespace std;

struct Foo {
	Foo (int name) : name_(name){}
	~Foo () { cout << "destruct " << name_ << endl; }
	int name_;
};

void bar () {
	Foo foo1(1);
	{
		Foo foo2(2);
	}
	{
		Foo foo3(3);
	}
}

int main() {
	bar();
	return 0;
}