#include <iostream>
#include <functional>
using namespace std;
int main() {
function<void(int)> f;
f = [](const int& i) -> int { cout<<i<<endl; return i; };
f(2);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8ZnVuY3Rpb25hbD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJZnVuY3Rpb248dm9pZChpbnQpPiBmOwoJZiA9IFtdKGNvbnN0IGludCYgaSkgLT4gaW50IHsgY291dDw8aTw8ZW5kbDsgcmV0dXJuIGk7IH07CglmKDIpOwoJcmV0dXJuIDA7Cn0=