public static void generateParentheses(int left, int right, String s, List<String> res) {
    	if (left == 0 && right == 0) {res.add(s); return;}
    	if (left > right) return;
    	if (left > 0) generateParentheses(left - 1, right, s + "(", res);
    	if (right > 0) generateParentheses(left, right - 1, s + ")", res);
    }