In an Alpine valley there are villages, numbered from to , connected by only n - 1 roads. Although it is still possible to get from any village to any other, this may take quite some time. This is particularly annoying when you have to buy basic supplies, since only of the villages have a shop.
This winter, the situation has become even worse due to heavy snowfall. It would therefore be advisable either to leave the valley, that is, to get to village — the only village at the mountain pass connecting the valley with the outside world — or at least to buy enough supplies for the coming months. This morning you heard on the radio that the snow has made one of the n - 1 roads unusable; unfortunately, you could not make out which one.
You now want to know whether you and your friends can leave the valley and, if not, the minimum distance each of you has to drive to reach a village with a shop. Since you do not yet know which road is blocked and your friends live in different villages across the valley, you have to answer this question for given pairs of a blocked road and a village.
The first line contains four integers , , and e~(1 \le n \le 10^5, 1 \le s \le n, 1 \le q \le 10^5, 1 \le e \le n) — the number of villages, the number of shops, the number of queries, and the village that has to be reached to leave the valley.
Each of the next n - 1 lines contains three integers , and w~(1 \le a, b \le n, 1 \le w \le 10^9), meaning that villages and are connected by a road of length . The roads are numbered from to n - 1 in the order in which they are given.
Each of the next lines contains one integer c~(1 \le c \le n), meaning that there is a shop in village . All these numbers are distinct, that is, no village has more than one shop.
Each of the last lines contains two integers and r~(1 \le i \le n - 1, 1 \le r \le n), meaning that road number has become unusable, and you want to know whether your friends in village can leave the valley and, if not, how far the nearest village with a shop is.
Print lines: the -th line must contain the answer to the -th query. If it is possible to leave the valley, print "escaped". Otherwise, print the distance to the nearest reachable village with a shop, or "oo" if no shop can be reached anymore.
Example 1
Example 2
The figure shows the situation before any road becomes unusable. The villages with shops are shaded in grey. Each road is labeled "index / length". The exit from the valley is in village .
