Go Back
Scooby Doo Is In Danger (200)
Description

Shaggy and Scooby are in the middle of another magical mystery and apparently Scooby Doo’s life is in danger, he is trapped in a burning house which is locked by a magical door. Shaggy is trying to help Scooby.

The door has a word (all alphabets are lowercase) written on it. To open the door, all Shaggy needs to do is to pick some alphabets from that word ( in any order ) and try to form the word “scooby” out of them.

Your task is to find out if it is possible to save Scooby Doo.

Input

The first line of input contains a single integer T denoting the number of test cases. ( The number of times your program will be tested / The number of questions )
Each test case consists of a single line containing the initial word written on the door.

Output

Output T lines.
Each of these lines should contain the answer to the corresponding testcase :
“yes” (without quotes, all alphabets are lowercase) if it is possible to save Scooby Doo.
“no” (without quotes, all alphabets are lowercase) if it is NOT possible to save Scooby Doo.
( see example for clarification )

Constraints

1 <= T <= 50
Length of the input word is greater than or equal to 1 and less than or equal to 100.
All the alphabets of the input words are of lowercase.

Example
Copy Input

Input:
5
scsobsoybysbo
scoby
yyyzbbbzooozcczssss
scccozzbboooaaalllobbbbb
ajsosccafsossobsyby

Output:
yes
no
yes
no
yes

Explanation

The 1st , 3rd the 5th test cases have enough alphabets needed to form “scooby” from them.
Test case 2:
The word is missing one more ‘o’, so “scooby” cannot be formed.
Test case 4:
The word is missing ‘y’, so “scooby” cannot be formed.

Single Round Match #01
3 hour contest



Announcement
Give your feedback here: https://goo.gl/forms/Gdo1j27AuHx659Lx1

Ratings will be changed within 48 hours after the contest ends.

Problem Tags
adhoc,strings

Supported by our Coding Partner