split goqueque into stack and queue