```
class Queue:
# initialize your data structure here.
def __init__(self):
self.inStack = []
self.outStack = []
# @param x, an integer
# @return nothing
def push(self, x):
self.inStack.append(x)
# @return nothing
def pop(self):
if not len(self.outStack) == 0:
self.outStack.pop()
return
while not len(self.inStack) == 0: self.outStack.append(self.inStack.pop())
self.outStack.pop()
# @return an integer
def peek(self):
if not len(self.outStack) == 0: return self.outStack[-1]
while not len(self.inStack) == 0:
self.outStack.append(self.inStack.pop())
return self.outStack[-1]
# @return an boolean
def empty(self):
if len(self.outStack) == 0 and len(self.inStack) == 0: return True
else: return False
```