#define I inline #define ll long long #define pb push_back #define MP make_pair #define ull unsigned long long #define PII pair<int , int> #define PSL pair<string , long long> #define PLL pair<long long , long long> #define all(x) (x).begin() , (x).end() #define copy(a , b) memcpy(a , b , sizeof(a)) #define clean(a , b) memset(a , b , sizeof(a)) #define rep(i , l , r) for (int i = (l); i <= (r); i ++) #define per(i , r , l) for (int i = (r); i >= (l); i --) #define PE(i , x) for(int i = head[x]; i; i = edge[i].last) #define DEBUG(x) std :: cerr << #x << '=' << x << std :: endl
usingnamespacestd;
constint N = 10001; constint M = 100001; constint HA = 998244353;
int n , m , node[M];
structEdge{ int to , last , dis; }edge[M << 1];
int edge_num; int head[M << 1];
voidadd_edge(int from , int to , int dis){ edge[++ edge_num] = (Edge){to , head[from] , dis}; head[from] = edge_num; edge[++ edge_num] = (Edge){from , head[to] , dis}; head[to] = edge_num; }