1 #include<iostream>
2 #include<cstdio>
3 #include<cstring>
4 #include<algorithm>
5 #include<queue>
6 #include<stack>
7 #include<map>
8 #include<set>
9 #define ll long long
10 #define Pi acos(-1.0)
11 #define mod 1
12 #define MAX 100000
13 #define bug(x) printf("%d************\n",x);
14 using namespace std;
15 int t;
16 char a[100005];
17 int main()
18 {
19 while(scanf("%d",&t)!=EOF)
20 {
21 //getchar();
22 for(int j=1;j<=t;j++)
23 {
24 memset(a,0,sizeof(a));
25 int flag=0;
26 cin>>a;
27 int len=strlen(a);
28 for(int i=0;i<len-1;i++)
29 {
30 if(a[i]==‘#‘&&a[i+1]==‘#‘)
31 {
32 flag=1;
33 break;
34 }
35 }
36 if(flag)
37 cout<<"no"<<endl;
38 else
39 cout<<"yes"<<endl;
40 }
41 }
42 return 0;
43 }
44 /**************************************************************
45 Problem: 1172
46 User: 853665920
47 Language: C++
48 Result: Accepted
49 Time:84 ms
50 Memory:1872 kb
51 ****************************************************************/