#include <iostream>
#include<vector>
using namespace std;
template <class T>
class Stack{
public:
void Push(const T& key);
void Pop();
T& Top();
bool Empty() const;
private:
vector<T> c;
};
template<class T> void Stack<T>::Push(const T& key)
{
c.push_back(key);
}
template<class T> void Stack<T>::Pop()
{
if (!Empty())
{
c.pop_back();
}
}
template <class T> T& Stack<T>::Top()
{
if (!Empty())
{
return c.back();
}
}
template<class T> bool Stack<T>::Empty() const
{
return c.empty();
}