###name path

###descripption You have a directed weighted graph with n vertexes and m edges. The value of a path is the sum of the weight of the edges you passed. Note that you can pass any edge any times and every time you pass it you will gain the weight.

Now there are q queries that you need to answer. Each of the queries is about the k-th minimum value of all the paths.

###input The input consists of multiple test cases, starting with an integer t (1≤t≤100), denoting the number of the test cases. The first line of each test case contains three positive integers n,m,q. $$(1≤n,m,q≤5∗10^4)$$

Each of the next m lines contains three integers ui,vi,wi, indicating that the i−th edge is from ui to vi and weighted wi.$$(1≤u_i,v_i≤n,1≤w_i≤10^9)$$

Each of the next q lines contains one integer k as mentioned above.$$(1≤k≤5∗10^4)$$

It's guaranteed that$Σn ,Σm, Σq,Σmax(k)≤2.5∗10^5$ and max(k) won't exceed the number of paths in the graph.

###output For each query, print one integer indicates the answer in line.

###sample input 1 2 2 2 1 2 1 2 1 2 3 4

###sample output 3 3

###hint 1->2 value :1

2->1 value: 2

1-> 2-> 1 value: 3

2-> 1-> 2 value: 3

###toturial 拓展一条边有两种方式，第一终点往外走 ， 第二相同起点的下一条边，这样做的前提是边要有序，从小到大排好

###code

-----------------------本文结束感谢您的阅读-----------------------