private int app(int l,int h){
        int u;
        if(G[l][h] != -1){ 
            return G[l][h];
        }else if( ((l==0)||(l==1)) && ((h==0)||(h==1)) ) {
            u = eval(String.valueOf(l) + op + String.valueOf(h))?1:0;
        }else if(T1[l][0] == T2[h][0]){
            u = mk(T1[l][0], app(T1[l][1],T2[h][1]) , app(T1[l][2],T2[h][2]));
        }else if(T1[l][0] < T2[h][0]){
            u = mk(T1[l][0], app(T1[l][1],h), app(T1[l][2],h) );
        }else{
            u = mk(T1[h][0], app(l,T2[h][1]), app(l,T2[h][2]) );
        }
        G[l][h] = u;
        return u;
    }