Find longest path, has issues with cycles.