SCC's graph builder