A string is significant for Ann(Alogv) if it contains at least one magic substring: "BSM". For the given strings, determine their significance.
The first line of the standard input contains a natural number (1 \leq n \leq 100) – the number of strings whose significance needs to be determined. The following lines contain the strings themselves.
For each string, print YES if it is significant, and NO otherwise.
Example 1