#Lutece0586. max air city

max air city

Migrated from Lutece 586 max air city

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

MAX AIR CITY is an illusory city.Matters every day in this bustling city is happening. MAX AIR CITY is made up of nn regions (conveniently numbered from 11 to nn) but unfortunately is connected by unidirectional roads, however, to overcome the shortages, there can be multiple roads between any two regions.

Today, YAN leaves Tian all of a sudden because Tian has made a serious mistake. Tian is eager to find YAN.

He has to go to LL different regions to collect information in order to make a decision how should he take the next step.

Now, Tian has a list which indicates the regions he will reach. But he is not sure the order of visiting.

So once he has got to a region, he has to return home to analyse the next place to go to. Be careful that it takes time t[i]t[i] to prepare his leaving(such as have a meal,the call of nature). In other words, to travel from region ii to any other adjacent city jj, preparation would cost him t[i]t[i] of time to , and then time w(i,j)w(i, j) on the road.

Tian wants to find YAN as soon as possible even any piece of message about her, so he wants to use the least time to collect information. Luckily ,you are a good programmer and he is eager to ask for your help to calculate the minimum time that it may take him to find his YAN.

Input

The first line of the input contains an integer TT indicating the number of cases.

Each case contains M+3M+3 lines. The first line contains 44 integers NN MM SS LL separated by blank. NN (2N500002\leq N\leq 50000) is the number of regions. MM (1M5000001\leq M\leq 500000) is the number of roads. SS indicates which region Tian’s home is in.

LL is number of regions that Tian has to reach. The second line is LL integers indicating the number of these regions.

Then a line with NN integers indicating the time that must be cost to prepare t[i]t[i] (0t[i]1090\leq t[i]\leq 10^9) .

The following MM lines each contains 33 integers uu vv ww separated by a blank indicate that there is a road from uu to vv, and it would cost time ww.

All data will fit in a 6464-bit integer.

Output

For each test case, output one line with an integer indicating the minimum time. Note that if Tian can’t visit all the regions or he can’t return home after any visiting, then output “Tumblerful” (without quotation).

Samples

2
3 4 1 2
2 3
5 5 5
1 2 3
2 3 5
3 1 7
1 3 4
2 1 1 1
2
2 3
1 2 3
51
Tumblerful

Note

  1. For the first case, Tian begins from his home at region 11, spend 55 minutes to prepare. Then spend 33 minutes on the road from region 11 to region 22.Then he finished visiting and return ,spend 55 minutes in region 22 to prepare, via road 232\rightarrow 3 get to region 33 and spend 55 minutes for preparation. Via road 313\rightarrow 1 he return home. The next place is region 33. So he started at region 11 spending 55 minutes to prepare and then via road 1311\rightarrow 3\rightarrow 1 to finish his work of collecting information. The total time is (5)+3+(5)+5+(5)+7+(5)+4+(5)+7=51(5)+3+(5)+5+(5)+7+(5)+4+(5)+7=51,the number in the brackets indicate the time for preparation.
  2. Huge input datas , scanf is recommended.

Resources

Sichuan University Programming Contest