Wrtie a code for queues using stack