As the commercial goes, "Mama always tells". That means, in chinese, if you got a lot of "8"s at the tail of your receipt ID, you would get a big prize. Now, you cannot wait to know how lucky you are. So you take out all your receipts and decide to write a program to count how big the prize you'll get.
There are one or more test cases in the input file, and the first line contains an integer T<=100 indicating the total number of test cases. For each test case, there is a line containing a string representing one of your receipts' ID. The string will contains only alphabets, dots, and number digits, and is of length no more than 100.
For each receipt, please output several "big" according the number of "8"s in the tail of that receipt ID. If no "8" at the tail, output "bang" instead.
3 40666888 APTX4869 140.118.8.8
bigbigbig bang big
Migrated from old NTUJ.
Tmt
No. | Testdata Range | Score |
---|