private static void recur(ArrayList<String> list, int left, int right, int n, String str) {
    	if (left < right) return;
    	if (left > n || right > n) return;
    	else {
    		if (left == right && left == n) {
    			list.add(str);
    		}
    		else {
    			//left
    			System.out.println("left is " + left + "right is " + right + "str is " + str);
    			recur(list, left+1, right, n, str+"(");
    			recur(list, left, right+1, n, str+")");
    			//right
    		}
    	}
    }