You are given an undirected weighted graph $$$G$$$ with vertices $$$1, 2, \ldots, n$$$. Please output the sum of the answers to the following $$$x$$$ questions:
The first line contains one integer $$$T~(1 \le T\le 2000)$$$, the number of test cases.
For each test case, the first line contains three integers $$$n, m, x~(1\le n\le 2000, 0\le m\le 5000, 1\le x\le 10^9)$$$. Each of the next $$$m$$$ lines describes an edge of the graph. Edge $$$i$$$ is denoted by three integers $$$a_i, b_i, w_i$$$ $$$(1\le a_i, b_i\le n, 1\le w_i\le 10^9)$$$, the labels of vertices it connects and its weight. Note that self-loops and parallel edges may exist.
It is guaranteed that the sum of $$$n$$$ over all test cases is no more than $$$2000$$$ and the sum of $$$m$$$ over all test cases is no more than $$$5000$$$.
For each test case, output one integer modulo $$$998244353$$$ denoting the answer.
43 2 101 2 52 3 43 0 10000000003 3 1001 2 31 3 42 3 54 6 10000000001 2 2441 2 3251 4 9273 3 2482 4 8343 4 285
125 0 15300 840659991