Amazon Interview Question

make stack to the queue