public void push(int stackId, int data){
        if(stackId == 1){
            if(topleft+1 == basemiddle){
                if(stack3RightShiftable()){
                    shiftStack3Right();
                    array[++topleft] = data;
                }else
                    return;
            }else{
                array[++topleft] = data;
            }    
        }else if(stackId == 2){
            if(topright-1 == topmiddle){
                if(stack3LeftShiftable()){
                    shiftStack3Left();
                    array[--topright] = data;
                }else
                    return;
            }else{
                array[--topright] = data;
            }
        }else if(stackId == 3){
                if(topmiddle == topright - 1){
                    if(stack3LeftShiftable()){
                    shiftStack3Left();
                    array[++topmiddle] = data;
                }else
                    return;
            }else{
                array[++topmiddle] = data;
            }
        }else
            return;
    }