Implementation of stack using queue