public void tryNext(ArrayList<ArrayList<Integer>> res, Map<Integer, Integer> num2count,
			int[] has, int cur) {
		if(cur == has.length) {
			ArrayList<Integer> list = new ArrayList<Integer>();
			for(int temp : has) list.add(temp);
			res.add(list);
			return;
		}
		Set<Integer> current = new HashSet<Integer>();
		current.addAll(num2count.keySet());
		for(int temp : current) {
			has[cur] = temp;
			if(num2count.get(temp) == 1) num2count.remove(temp);
			else num2count.put(temp, num2count.get(temp) - 1);
			tryNext(res, num2count, has, cur+1);
			if(num2count.containsKey(temp)) num2count.put(temp, num2count.get(temp) + 1);
			else num2count.put(temp, 1);
		}
	}