Significant String#11437

Significant String

1 second
256 megabytes
Very easy

A string is significant for Ann(Alogv) if it contains at least one magic substring: "BSM". For the given strings, determine their significance.

Input

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.

Output

For each string, print YES if it is significant, and NO otherwise.

Examples

Example 1

Loading
Loading