@Override
    public Integer next() {
        if(hasNext()){
            Iterator<Integer> it = queue.poll();
            int val = it.next();
            if(it.hasNext()) queue.offer(it);
            return val;
        }
        return -1;
    }