#include"iostream"
#include"cstdlib"
#include"list"
#include"string"
using namespace std;
int main()
{
listcity;
list::iterator it;
city.push_back("Shanghai");
city.push_back("Chongqing");
city.push_front("Tianjin");
city.push_front("Guangzhou");
city.push_front("Beijing");
city.push_back("Wuhan");
it=city.end();
//for(;;it++)
// cout<<*it<<' ',system("pause");
for(list::iterator it=city.begin();it!=city.end();it++)
cout<<*it<<' ';
cout<<endl;
city.pop_front();
for(list::iterator it=city.begin();it!=city.end();it++)
cout<<*it<<' ';
cout<<endl;
for(list::iterator it=city.begin();it!=city.end();it++)
cout<<*it<<' ';
cout<<endl;
system("pause");
return 0;
}