Queue implementation with stacks