#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;
}