//头文件需要调整为list,同时deque的位置都换为list
/*************************************************************************
> File Name: ex9.19.cpp
> Author:
> Mail:
> Created Time: Mon 26 Feb 2024 08:38:42 PM CST
************************************************************************/
#include
#include
using namespace std;
int main(){
list<string> str;
string word;
while(cin>>word){
str.push_back(word);
if(cin.get() == '\n'){
break;
}
}
list<string>::iterator it;
for(it = str.begin(); it != str.end(); ++it){
cout<<*it<<" ";
}
cout<<endl;
return 0;
}