#include <iostream>
using namespace std;
int main() {
int X = 1;
auto worker = [=]() mutable {return X++;};
auto worker2 = worker;
cout << worker() << endl;
cout << worker2() << endl;
cout << worker() << endl;
cout << worker2() << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgWCA9IDE7CgkKCWF1dG8gd29ya2VyID0gWz1dKCkgbXV0YWJsZSB7cmV0dXJuIFgrKzt9OwoJYXV0byB3b3JrZXIyID0gd29ya2VyOwoJCgljb3V0IDw8IHdvcmtlcigpIDw8IGVuZGw7Cgljb3V0IDw8IHdvcmtlcjIoKSA8PCBlbmRsOwoJY291dCA8PCB3b3JrZXIoKSA8PCBlbmRsOwoJY291dCA8PCB3b3JrZXIyKCkgPDwgZW5kbDsKCQoJcmV0dXJuIDA7Cn0=