stack with two queues