Assignment 4. Calculating strongly connected graph components