Solution to implement queue using two stacks