import sys import io, os input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline n, m = map(int, input().split()) g = [[] for i in range(n)] for i in range(m): a, b, c = map(int, input().split()) a, b =a-1, b-1 g[a].append((c, b)) g[b].append((c,a)) dp = [[-1]*n for i in range(1<>v)&1): continue for c, u in g[v]: if (s>>u)&1: continue ns = s|(1<