fixed longest path acyclic undirected graph problem!