#include<vector>
#include<string>
using namespace std;
//using std::iostream;
//using std::string;
//using std::vector;
int main()
{
cout<<"please push in words"<<endl;
string word;
vector<string> jeff;
while(1) //也可以直接ctrl+d 結束 ,不用if(word=="abc")
{
cin>>word;
if(word=="abc")
break;
jeff.push_back(word);
}
vector<string>::size_type n;
n=jeff.size();
//int n=jeff.size(); //也可以用直接用int
//cout<<"erro"<<n<<endl; //在前後插入看是哪裏錯了,還是挺好用的。
while(n>0) //n>0也可以,很奇怪
{
cout<<jeff[n-1]<<endl; //必須-1!
n--;
}
return 0;
}