#include <iostream>
#include <vector>
#include <numeric>
#include <iterator>
using namespace std;
int main()
{
vector<int> v(5);
iota(v.begin(),v.end(),1);
vector<int>::iterator It = v.begin();
while(It != v.end())
cout<<*It++<<" ";
cout<<endl;
It = v.begin()+2;
cout<<*It<<endl;
getchar();
return 0;
}