We define a string consisting of several disjoint

sequences as a ''good red-string''.
For example,

is a good red-string , because it can be performed as
rer
ded, which can consist of 2 disjoint

sequences. Inversely,

is not a good red-string.
Now you are given a string with characters 'r','e','d' and '?'. You can replace '?' with 'r','e' or 'd' arbitrarily. Please determine if the string can be defined as a good red-string.
输入描述:
Each test contains multiple test cases. The first line contains the number of test cases
(
). Description of the test cases follows.
Each test case has a string
, consisting of 'r','e','d' and '?'.
It's guaranteed that for each case
is divisible by
, and the sum of
over all test cases does not exceed
.
输出描述:
For each test case, print a single line containing "Yes" if the given string can be defined as a good string and "No" otherwise.
You can print letters in any case (upper or lower).
示例1
输入
复制
6
????dd
???
??d
redder
?e?
r??e?d
说明
"r??e?d" can be a good red-string like "rreedd" or "reredd".