406751: GYM102535 H Beep Bop Boop

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

H. Beep Bop Booptime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

Congratulations! You have passed the preliminary screening of the Academy of Covert Missions and are now on your final test.

You have been tasked to keep track of some bops roaming around the Town Hidden in the Leaves. These bops are creatures that move very swiftly and are hard to spot, but you and your team have been successful in placing Toogly Tags around their necks. These tags allow you to know what each creature is doing, and even know where it is. Unfortunately, Nagaraiya, your examiner, tells you that you ended up putting the Toogly Tags on other creatures as well that are not bops, and now you have to sort them out! That's nuts!

Thankfully those Toogly Tags that you attached not only know what the creatures are doing, but can also record the sounds that they are making as well. You remember the age-old Covert Agent Way: "If it beeps like a bop and boops like a bop, then it must be a bop."

With this wisdom that is almost as old as Wan Puhn Seh, you now have a way to sort the bops from the other creatures! Bops can only make the sounds "BEEP" or "BOOP". Other creatures make their own sounds that are never "BEEP" or "BOOP".

You now go back to Nagaraiya and tell him which ones are bops and which ones are not!

Input

On the first line is an integer $$$C$$$, the number of creatures that you have attached Toogly Tags on. Then follow $$$C$$$ blocks describing the sounds that each creature makes.

Each block starts with a line containing an integer $$$N_i$$$, the number of sounds that the $$$i^{th}$$$ creature made. Then follow $$$N_i$$$ strings, each on its own line, indicating a sound that the $$$i^{th}$$$ creature made.

Constraints

$$$1 \le C \le 350$$$

$$$1 \le N_i \le 350$$$

Each sound consists of uppercase letters only and has length between $$$1$$$ and $$$10$$$ (inclusive).

Output

If the creature is a bop, print "IT'S A BOP!" (without the quotes). Otherwise, output "IT'S NOT A BOP!" (without the quotes).

ExamplesInput
3
3
BEEP
BOOP
BOOP
4
BOOP
BEEP
BEEP
BOOP
4
BIP
BUP
QUACK
BOO
Output
IT'S A BOP!
IT'S A BOP!
IT'S NOT A BOP!
Input
3
7
BEEP
BOOP
BEEP
BOOP
BOOP
BOOP
BEEP
5
QUACK
KWAK
QUACK
KWAKK
QUAKK
3
ARF
WOOF
ARFF
Output
IT'S A BOP!
IT'S NOT A BOP!
IT'S NOT A BOP!

加入题单

算法标签: