import sequtils,strutils,algorithm,math type item = tuple[a, b, score : int] var N,M,a,b,c : int p : item (N,M) = stdin.readline.split.map(parseInt) var Items = newSeq[item](0) nodes = newSeq[int](N) ans : int for n in 0..