impl strong connected components