#include <iostream>
#include <iterator>
#include <vector>
#include <list>
using namespace std;
template <typename T>
vector<int> func(T buf)
{
vector<int> t;
t.push_back(*next(buf, 0));
t.push_back(*next(buf, 1));
return t;
}
int main() {
list<int> ls;
vector<int> v;
ls.push_back(2);
ls.push_back(111111);
v.push_back(12);
v.push_back(11);
vector<int> t1= func(v.begin());
vector<int> t2= func(ls.begin());
cout<<t1[0]<<endl<<t1[1]<<endl;
cout<<t2[0]<<endl<<t2[1]<<endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aXRlcmF0b3I+CiNpbmNsdWRlIDx2ZWN0b3I+CiNpbmNsdWRlIDxsaXN0Pgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdGVtcGxhdGUgPHR5cGVuYW1lIFQ+CnZlY3RvcjxpbnQ+IGZ1bmMoVCBidWYpCnsKCXZlY3RvcjxpbnQ+IHQ7Cgl0LnB1c2hfYmFjaygqbmV4dChidWYsIDApKTsKCXQucHVzaF9iYWNrKCpuZXh0KGJ1ZiwgMSkpOwoJCglyZXR1cm4gdDsKfQoKaW50IG1haW4oKSB7CgkKCWxpc3Q8aW50PiBsczsKCXZlY3RvcjxpbnQ+IHY7Cglscy5wdXNoX2JhY2soMik7Cglscy5wdXNoX2JhY2soMTExMTExKTsKCXYucHVzaF9iYWNrKDEyKTsKCXYucHVzaF9iYWNrKDExKTsKCQoJdmVjdG9yPGludD4gdDE9IGZ1bmModi5iZWdpbigpKTsKCXZlY3RvcjxpbnQ+IHQyPSBmdW5jKGxzLmJlZ2luKCkpOwoJCgljb3V0PDx0MVswXTw8ZW5kbDw8dDFbMV08PGVuZGw7Cgljb3V0PDx0MlswXTw8ZW5kbDw8dDJbMV08PGVuZGw7CgkKCXJldHVybiAwOwp9