from collections import * from itertools import * from functools import * import sys,math input = sys.stdin.readline N,M = map(int,input().split()) dist = [[-1]*N for _ in range(N)] for _ in range(M): a,b,c = map(int,input().split()) a -= 1 b -= 1 dist[a][b] = max(dist[a][b],c) dist[b][a] = max(dist[a][b],c) for i in range(N): dist[i][i] = 0 dp = [[0]*(1<>j)&1: visited.append(j) else: target.append(j) for j in visited: for k in target: if dist[j][k]==-1: continue dp[k][i|(1<