Project Euler #186: Connectedness of a network.