Time

10:47:15
11 Feb 2012
ACM-ICPC Thailand Southern Region Programming Contest 2011
Left: 4 hours 13 minutes
End: 11.02.2012 15:00
Leader: Informatimukas
Five for week 22
Left: 11 hours 13 minutes
End: 11.02.2012 22:00
Leader: NuM
Version for print

The word of sponsor

   At the end of the tournament "The New-Year Night", the sponsor decided to send the presents to m prize-winners by post. You know the number of competitors n and the delivering time for post between some departments of "Ukrpost". Find the time when the last prize-winner will receive his prize.


Specifications

   Input

   In the first line we have 3 integers: the number of tournament competitors n, the number of prizes from sponsor m and the number of known delivering time k for post between some departments. In next line we have the number of competitors, who became prize-winners. These numbers are separated with a space.

   Each of the next k lines contains 3 numbers and describe the information about known delivering time for post between some departments in format: a b t where a and b are numbers of departments, t (0t365) is time of delivering for post between some departments.

   The last line gives the post department number, where grom the sponsor will send his presents. It is known that 1n, m, a, b365.

   Output

   If all presents will be deliver to competitors than make clear in first line "The good sponsor!", and in next line male clear through what time the least of prize-winners will receive his prize. If one of competitors can’t receive his prize than you must make clear in one line "It is not fault of sponsor...". The phrases make clear without quotation marks.


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 5
Complexity: 24% 166/218
Classes: Graph theory

Example

Example input

3 2 2
2 3
1 2 3
2 3 4
1

Example output

The good sponsor!
7


← The favorite numbers of Santa Cl Problems Matches triangles →