P28668 [洛谷] Manhattan Project E
提高+
题目描述

Background

In June 1942, the United States initiated a plan to develop an atomic bomb using nuclear fission reactions, also known as the Manhattan Project. Later, two atomic bombs exploded in Hiroshima and Nagasaki, and the world witnessed the power of nuclear weapons, trembling under its threat. In the year 2200, the dedsec organization infiltrated the U.S. nuclear weapon system through cybersecurity vulnerabilities in the U.S. military and conspired to use the hidden nuclear reserves in Manhattan to destroy the world. However, a member of dedsec, Badboy17, opposed this plan and informed Aiden about it. To save his family and prevent the Earth from becoming a wasteland, Aiden had to once again use his hacking skills to save the world.

Problem Description

Aiden attempts to hack into dedsec's system and gain control, but dedsec reacts and counterattacks.

dedsec's network can be seen as a connected graph with $n$ nodes and $n-1$ edges (a tree), where each node has a stability value.

Aiden can choose a chain in the network and hack the nodes on that chain (remove that chain from the tree).

Assuming the chain length is $m$, you will get $m$ nodes.

Then Aiden and dedsec will engage in a battle of offense and defense, taking turns. Each turn, they can perform some operations on any node with a stability value greater than $0$, according to the calculation rules. The stability value cannot be reduced to less than $0$ after an operation, or the computer will explode. The side that cannot perform an operation is considered the loser.

Since dedsec has the geographical advantage of defense, dedsec takes the first move.

Aiden, although skilled in hacking, has a dead phone. He has informed you of this situation and hopes you can help him save the world. Therefore, you need to write a program to determine if there is a way for Aiden to win. Of course, dedsec's defense might be flawless, and Aiden might not be able to win, in which case you would have to go to the shelter as a test subject.

Input Format

The input contains multiple sets of test data. The first line of input contains an integer $T$, indicating the number of test cases.

For each set of test data, the first line contains an integer $n$, indicating there are $n$ nodes.

From the second line to the $n$-th line, each line contains two integers $u, v$, indicating there is an edge connecting nodes $u$ and $v$.

The $(n+1)$-th line contains $n$ integers $w$, where $w_i$ represents the stability value of node $i$.

The $(n+2)$-th line contains an integer $k$, describing the rules of the operation:

  • If $k=1$, you can reduce the stability value by any positive integer.
  • If $k=2$, the next line contains a positive integer $s$, indicating each side can reduce the stability value by a non-negative integer power of $s$.
  • If $k=3$, the next line contains a positive integer $s$, indicating each side can reduce the stability value by an integer greater than or equal to $s$.
  • If $k=4$, each side can reduce the stability value by any positive integer, or split a node with a stability value greater than or equal to $2$ into two nodes, where the sum of the stability values of the two new nodes equals the original node (e.g., $7$ split into $3+4$).
  • If $k=5$, neither side can perform any operations.

Output Format

For each set of test data, output one line:

If there is a way for you to win, output Mutalisk ride face how to lose?.

If there is no way to win, output The commentary cannot go on!.

Sample Input and Output

Sample Input #1

1
3
1 2
2 3
1 2 3
1

Sample Output #1

Mutalisk ride face how to lose?

Sample Input #2

1
3
1 2
2 3
1 2 4
1

Sample Output #2

The commentary cannot go on!

Notes/Hints

Test Point $n\le$ $k$ $w_i\le$
1 50 1 $10^3$
2 $3\times 10^4$ 1 $10^3$
3 300 3 $10^6$
4 $10^3$ 4 $10^6$
5 $3\times 10^4$ 1 $10^9$
6 $3\times 10^4$ 2 $10^9$
7 $3\times 10^4$ 3 $10^9$
8 $3\times 10^4$ 3 $10^9$
9 $3\times 10^4$ 4 $10^9$
10 $3\times 10^4$ 4 $10^9$

For $100\%$ of the data, $T\le 5$.

All input values are guaranteed to be positive integers.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1 3 1 2 2 3 1 2 3 1
样例输出
Mutalisk ride face how to lose?