import copy N,M=tuple(map(int,input().split(' '))) x=[[-1 for j in range(N)] for i in range(N)] for i in range(M): temp1,temp2,temp3=tuple(map(int,input("").split(" "))) temp1-=1 temp2-=1 x[temp1][temp2]=max([temp3,x[temp2][temp1]]) x[temp2][temp1]=max([temp3,x[temp2][temp1]]) dp_s=[] if True: dp=[[-1 for j in range(N)] for i in range(1<=0: A=max([A,dp[i2][i3]]) for j in range(N): if x[i3][j]>=0 and not(i2&(1<