Xiao A is a senior Hearthstone player. He recently learnes technology and understanding of the game from a Hearthstone good-looking anchor djw. He is very envious of djw's skills. Whenever he faces the djw's textbook-like Defile, he always exclaims. He wants to become a player just like djw, please write a program to help him hone his skills.
Since Xiao A plays the Youth version of hearthstone Legend, each player can have up to minions, each of whom has corresponding health and attack power, and dies when one's health is less than
point.
When an minion with point attack power and
point life value attacks an minion with
point attack power and
point health value, the attack power of the two minions remains the same, and the health value becomes
,
respectively.
At present, the enemy has minions on the field, and each minion has an
-point attribute value (representing that both health and attack power are
); your own side has
minions, each minion has
-point attribute value, and each minion can do the following operation:
- Select an enemy minion to attack;
- No action.
There is a spell card called Defile that can deals damage to all minions (both enemies' and ourselves), and if it causes the death of any minion, cast this spell again. If in a certain situation, we cast just one Defile can cause the death of all minions on the field, we can say that we have reached a
. If there is no minion on the field when Defile is casted, it can also be called
.
The first line of input is an integerspecifying the number of cases to follow.
Each case consists of four lines of input:
First line gives an integer, represents the number of enemy's minions;
Second line givesintegers, representing the attribute value of the enemy's minions;
Third line gives an integer, represents the number of our minions;
Fourth line givesintegers, representing the attribute value of the our minions.
For all given attribute values,
For each case, after all your minions has completed the operation, ifcan be reached, then output "dui de dui de!", else output "bu dui bu dui!"