pick loop with least indegree