int main() { string s; stack<string> temp; while(cin>>s) temp.push(s); while(!temp.empty()) { cout<<temp.top()<<" "; temp.pop(); } return 0; }