#include <iostream>
#include <list>
using namespace std;
void main()
{
list<int> list1;
for(int i=0;i<8;i++)
list1.push_back(i);
list<int>::iterator it;
for(it=list1.begin();it!=list1.end();++it)
cout<<*it<<endl;
}
#include <list>
using namespace std;
void main()
{
list<int> list1;
for(int i=0;i<8;i++)
list1.push_back(i);
list<int>::iterator it;
for(it=list1.begin();it!=list1.end();++it)
cout<<*it<<endl;
}