void proc(char[] result, int pos, int l, int r, int n,
			List<String> resultList) {
		if (pos == 2 * n) { // final point!!
			String vaild = new String(result);
			if (!resultList.contains(vaild)) {
				resultList.add(vaild);
			}
		} else {
			char[] l_result = result.clone();
			char[] r_result = result.clone();

			if (l != 0) {
				l_result[pos] = '(';
				proc(l_result, pos + 1, l - 1, r, n, resultList);
			}

			if (check(l, r)) { // right parentheses cannot have more than left
				r_result[pos] = ')';
				proc(r_result, pos + 1, l, r - 1, n, resultList);
			}

		}
	}