#include <iostream>
#include <string>
using namespace std;

struct Foo
  {
   string name;
   Foo(const string &name):name(name) { cout<<"create "<<name<<endl; }
   ~Foo() { cout<<"destroy "<<name<<endl; }
  };


int main()
  {
   cout<<"1:"<<endl;
   Foo a("a");
   cout<<"2:"<<endl;
   for(int i=0;i<2;++i)
     {
      cout<<"3:"<<endl;
      Foo b(string("b")+(char)('0'+i));
      cout<<"4:"<<endl;
     }
   cout<<"5:"<<endl;
   return 0;
  }