3
4 4
0 1 1
1 2 1
0 2 100
2 3 1
2
0 3
6
4 4
0 1 1
1 2 1
0 2 100
2 3 1
1
0
0
4 4
0 1 1
1 2 1
0 2 100
2 3 1
1
0
10
