public List<List<String>> partition(String s) {
        List<List<String>> res = new ArrayList<List<String>>();
        if (s == null)
            return res;
        dfs(res, s, 0, new ArrayList<>());
        return res;
    }