exact(int N, int[][] m){
        this.sets = new ArrayList();
        nodes = new HashSet();
        for (int i = 0;i < N; i++)
            nodes.add(i);
        matr = m;
        size = N;
        ss = new int[size];
        
    }