public static int printOptimal(int[][] s,int i ,int j ){
		if (i == j) {
			System.out.print("A["+i+"]");
		}else {
			System.out.print("(");
			printOptimal(s, i, s[i][j]);
			printOptimal(s, s[i][j]+1,j);
			System.out.print(")");
		}
		return 0;
	}