public void helper(String path, int left, int right, int n) {
        if (left < right)
            return;
        if (left == n && right == n) {
            ans.add(path);
            System.out.println(path);
            return;
        }
        if (left < n)
            helper(path + "(", left + 1, right, n);

        helper(path + ")", left, right + 1, n);
    }