Example of finding a simple loop problem with a directed graph