/** Initialize your data structure here. */
queue<int> q;
MyStack() {
}
/** Push element x onto stack. */
void push(int x) {
q.push(x);
int len = q.size();
while(len > 1)
{
int temp = q.front();
q.pop();
q.push(temp);
len--;
}
}
/** Removes the element on top of the stack and returns that element. */
int pop() {
int temp = q.front();
q.pop();
return temp;
}
/** Get the top element. */
int top() {
return q.front();
}
/** Returns whether the stack is empty. */
bool empty() {
if(q.size() > 0)
return false;
return true;
}