private List<String> rebuildList(List<Integer>[] lists, String s, int end)
    {
    	List<String> ret = new ArrayList<String>();
    	for (int i = 0; i < lists[end].size(); ++i)
    	{
    		int start = lists[end].get(i);
    		String tmp = s.substring(start, end+1);
    		if (start == 0)
    		{
    			ret.add(tmp);
    		}
    		else 
    		{
    			List<String> sub = rebuildList(lists, s, start-1);
    			for (String str : sub)
    			{
    				ret.add(str + " " + tmp);
    			}
    		}
    	}
    	return ret;
    }