```
def __init__(self):
self.stack = []
def push(self, x):
self.stack.append(x)
for i in range(0,len(self.stack)-1):
self.stack.append(self.stack[0])
self.stack.pop(0)
def pop(self):
self.stack.pop(0)
def top(self):
return self.stack[0]
def empty(self):
return not self.stack
```