how many queues are needed to implement a stack