void number(int i){
        num[i]=low[i]=++count;
        stack.push(i);
        int j = f[i];
        if(num[j]==0){
            number(j);
            low[i]=Math.min(low[i], low[j]);
        } else if(stack.contains(f[i])){
            low[i]=Math.min(low[i], num[j]);
        }
        if(num[i]==low[i]){
            do{
                j = stack.pop();
                for(int e=0; e<n; e++){
                    if(f[e]==j) f[e]=i;
                }
                if(j!=i) f[j]=-1;
            } while(j!=i);
        }
    }