The King loves jewel very much, so he wants to dispatch no more than K soldiers to the jewel caves to collect jewels.
After a soldier arrives at a jewel cave, he will take all the jewels in the cave away. However, because of the harassment of the robbers in the route, when the soldier passes through the ith road he will pay Ci jewels to the robbers. At any time, the number of jewels on the soldier could be zero and even negative.
Please help the King setting up routes for every soldier to collect jewels as much as possible.
The first line contains an integer T, where T is the number of test cases. T test cases follow.
For each test case, the first line contains three integers N, M and K, where N is the number of jewel caves, M is the number of roads and K is the number of soldiers that the King could dispatch at most.The second line contains N integers A1, A2, ... , AN, where Ai is the number of jewels in the ith cave.Then M lines followed, each line contains three integers Ui, Vi and Ci, indicating there is a road connectsthe cave from Ui to Vi and when the soldiers pass through the road he should pay Ci jewels.• 1 ≤ T ≤ 10.
• 1 ≤ N ≤ 102.
• 0 ≤ M ≤ 103.
• 1≤ K ≤105• 0≤ Ai,Ci ≤104.• 1 ≤ Ui < Vi ≤ N.
For each test case, print one line containing “Case #x: y”, where x is the test case number (starting from
1) and y is the largest number of jewels the King could get.
For the first case, the King will dispatch 1 soldier. Soldier 1 will follow the route {1 → 2}.For the second case, the King will dispatch 2 soldiers. Soldier 1 will follow the route {1 → 2}. Soldier 2will follow the route {4}.