Hotspot
문제
Consider a country with towns. The towns are connected by roads, all with the same length. (See Figure 2 for an example.)
This country has citizens. Interestingly, the home and office of the th citizen are located in different towns and , respectively. Hence, every day, the th citizen moves back and forth between two fixed towns and (since the th citizen needs to work).
To save time, the th citizen will choose a path with the shortest length. If there are several shortest paths between and , the th citizen chooses by random one shortest path which Donald does not know. The expected chance that the th citizen passing through town w equals
\[E_i(w) = \frac{\text{Number of shortest paths between }A_i\text{ and }B_i\text{ passing through town }w}{\text{Number of shortest paths between }A_i\text{ and }B_i}\]
Donald is the president of the country and he wants to understand the needs of his citizens. He wants to setup a meeting office in a town so that he can meet as many citizens as possible. Precisely, he aims to setup the meeting office in a town that maximizes .
Your task is to help Donald identify the town . When there are multiple towns that maximize , report any one of them. In addition, due to certain geological constraints during the construction of the towns and roads, it is found that the number of shortest paths between any two towns will not exceed . Note that double-precision floating-point is required for this problem.
Example 1: Suppose where . Then, there is exactly one shortest path of length , which is . Donald can build the meeting office in either town , town , or town .
Example 2: Suppose where and . Then, there is exactly one shortest path between town and town of length , which is . Also, there is exactly one shortest path between town and town of length , which is . If Donald builds the meeting office in town , the expected number of citizens passing through town is .
Example 3: Suppose where and . Then, we have: (1) shortest paths of lenght between town and town . (2) 3 shotest paths of lenght between town and town . If Donald builds the meeting office in town , we have: (1) For the 0th citizen, shortest paths between town and town passing through town 2town passing through town . Then, the expected number of citizens passing through town 7 is . In fact, this is the best solution. Donald needs to build the meeting office in town .
입력
The input will start with two integers and in a single line. denotes the number of towns while denotes the number of edges. Then, the next lines are the roads, each consisting of two integers representing the two towns connected by the road.
Afterwards, the next line contains an integer , which denotes the number of citizens. It is followed by lines. The th line stores two integers and , for .
출력
Output a single line with exactly one integer, representing the town that maximises . When there are multiple possible towns, output any one of them.
예제
예제 1
5 5 0 1 1 2 2 3 3 4 4 0 2 1 3 2 4
2
예제 2
5 4 0 1 1 2 2 3 3 4 3 0 2 1 3 2 4
2
예제 3
6 5 0 2 1 2 2 3 3 4 3 5 2 0 5 1 4
3
예제 4
15 19 0 3 1 3 1 4 1 5 2 5 3 6 3 7 4 7 5 7 6 10 7 9 7 10 7 11 8 11 9 12 9 13 10 13 11 13 11 14 2 4 10 3 8
7