disjoint and BFS of deparments ready