The Death Star isn't the only thing Davis and the evil Galactic Empire have in common; they both have a high density of K-pop fans.
There are $$$n$$$ K-pop groups that the Galactic Empire allows its citizens to listen to – if they let them listen to any more than that, there would be massive productivity issues. Each stormtrooper in the 501st legion – Vader's Fist – "stans" (is a fan of) exactly one group, their favorite group. Each stormtrooper also has a favorite song by that group, however, the stormtroopers only share their favorite group with their peers, as sharing their favorite song would be too personal.
Darth Vader has just caught on to the fad, but as the heir to the great Galactic Empire, he wants to be unique. Lord Vader wants to make sure that, for whichever group he chooses as his favorite, he can find at least one favorite song that no stormtrooper has as their favorite song. Is this possible?
The first line contains the positive integer $$$n$$$ $$$(1 \le n \le 100)$$$ — the number of K-pop groups that Vader and the stormtroopers can listen to.
The next $$$n$$$ lines each contain a string $$$g_i$$$ $$$(1 \le |g_i| \le 20)$$$ and a positive integer $$$c_i \: (1 \le c_i \le 100)$$$, with $$$g_i$$$ corresponding to the name of the $$$i$$$-th K-pop group and with $$$c_i$$$ corresponding to the number of songs released by that group. It is guaranteed that group names are distinct.
The next line contains the positive integer $$$m$$$ $$$(1 \le m \le 10^4)$$$ — the number of stormtroopers in Vader's Fist.
The next $$$m$$$ lines each contain a string $$$s_j$$$ $$$(1 \le |s_j| \le 20)$$$ — the favorite group of the $$$j$$$-th stormtrooper.
Determine any one group that Darth Vader can stan as his favorite and print its name (there may be multiple possible answers, but you only need to print one). If there are no such groups, print NO KPOP FOR VADER.
3MONSTA_X 3BTS 2TWICE 26BTSMONSTA_XMONSTA_XBTSTWICEBTS
MONSTA_X
4NewJeans 2BLACKPINK 1StrayKids 1Seventeen 15NewJeansStrayKidsBLACKPINKNewJeansSeventeen
NO KPOP FOR VADER
For test case 1, both MONSTA_X and TWICE are valid answers.