Implement queue with deque