#pragma comment(linker, "/STACK:1024000000,1024000000")#include"stdio.h"#include"string.h"#include"iostream"#include"map"#include"string"#include"queue"#include"stdlib.h"#include"math.h"#define M 1100009#define eps 1e-10#define inf 1000000000#define mod 1000000000#define INF 1000000000using namespace std;struct node{ int v,w; node(int vv,int ww) { v=vv; w=ww; }};int n,k;vectoredge[101];int dfs(int u,int f){ printf("%d ",u); for(int i=0;i ().swap(edge[i]); } while(m--) { int a,b,c; scanf("%d%d%d",&a,&b,&c); edge[a].push_back(node(b,c)); edge[b].push_back(node(a,c)); } dfs(1,1); printf("\n"); }}