#include using namespace std; template class MyStack { list x; public: void push(const T& y) { x.push_front(y); } T top( ) { return x.front( ); } void pop( ) { x.pop_front( ); } bool empty( ) { return x.begin() == x.end(); } };