private boolean dfs(char[] chars, boolean turn) {
	        boolean found = false;
	        List<Object> params = new ArrayList<>(2);
	        params.add(new String(chars));
	        params.add(turn);
	//        if (!visited.add(params))
	//            return false;
	        for (int i = 0; i < chars.length-1; i++) {
	            if (chars[i] == '+' && chars[i+1] == '+') {
	                found = true;
	                chars[i] = '-';
	                chars[i+1] = '-';
	                boolean sub = dfs(chars, turn^true);
	                if (sub && turn)
	                    return true;
	                else if (!sub && !turn)
	                    return false;
	                chars[i] = '+';
	                chars[i+1] = '+';
	            }
	        }
	        // termination
	        if (!found)
	            return !turn;
	        else
	            return !turn; // unreachable
	    }