void readStack(stack<string> s)
{
while(!s.empty())
{
cout<<s.top()<<endl;
s.pop();
}
}
void main()
{
stack<string> sStack;
string s;
while(cin>>s)
{
sStack.push(s);
}
readStack(sStack);//将存入堆栈的内容显示出来
}
void readStack(stack<string> s)
{
while(!s.empty())
{
cout<<s.top()<<endl;
s.pop();
}
}
void main()
{
stack<string> sStack;
string s;
while(cin>>s)
{
sStack.push(s);
}
readStack(sStack);//将存入堆栈的内容显示出来
}