Use stack in place of queues
Sigiloso
Can be achieved using two stacks. While 'pop' is called, transfer all values from stack1 to stack2. And return (stack2.pop()). Then transfer back all elements from stack2 to stack1. This behaves as a queue (FIFO).