creating a stack out of two queues