for (auto iter = v.begin(); iter != v.end(); iter++)
cout << *iter << " ";
cout << endl;
vector<int>::iterator iter;
for ( iter = v.begin(); iter != v.end(); iter++)
cout << *iter << " ";
cout << endl;
vector<int>::reverse_iterator riter;
for (riter = v.rbegin(); riter != v.rend(); ++riter)
cout << *riter << " ";
cout << endl;