public void backtrack4(String s, int index, List<List<Integer>> list, StringBuilder single, List<String> result){
        if(index == 0){
            result.add(single.toString());
            return;
        }

        for(int i : list.get(index)){
            String sub = s.substring(i, index);
            single.insert(0, sub);
            if(i != 0) single.insert(0, " ");
            backtrack4(s, i, list, single, result);
            single.delete(0, sub.length());
            if(i != 0) single.deleteCharAt(0);
        }
    }