1
+ #include < bits/stdc++.h>
2
+ #define all (x ) x.begin(),x.end()
3
+ #define msg (str,str2 ) cout << str << str2<< endl
4
+ using namespace std ;
5
+
6
+ using ll = long long ;
7
+ using ld = long double ;
8
+ using uint = unsigned int ;
9
+ using ull = unsigned long long ;
10
+ template <typename T>
11
+ using pair2 = pair<T, T>;
12
+ using pii = pair<int , int >;
13
+ using pli = pair<ll, int >;
14
+ using pll = pair<ll, ll>;
15
+
16
+ #define pb push_back
17
+ #define mp make_pair
18
+
19
+ int gcd (int a,int b){
20
+ if (a%b==0 ) return b;
21
+ else return gcd (b,a%b);
22
+ }
23
+
24
+ clock_t startTime;
25
+ double getCurrentTime () {
26
+ return (double )(clock () - startTime) / CLOCKS_PER_SEC;
27
+ }
28
+ const int N = 3 ;
29
+ char ar[N];
30
+ char goalA[3 ] = {' y' ,' e' ,' s' };
31
+ char goalB[3 ] = {' Y' ,' E' ,' S' };
32
+ void solve (){
33
+ for (int e = 0 ; e < N; e++)cin>>ar[e];
34
+ // for(int e =0 ; e < 3; e++){
35
+ // cout << ar[e] << " ";
36
+ // }cout << endl; return;
37
+ for (int e = 0 ; e < N; e++){
38
+ if (ar[e] == goalB[e] || ar[e] == goalA[e]){;}
39
+ else {cout << " NO" <<endl;return ;}
40
+ }
41
+
42
+ cout << " YES\n " ;
43
+ }
44
+ int main (){
45
+ ios_base::sync_with_stdio (false );
46
+ cin.tie (0 );
47
+ int t; cin>>t;
48
+ while (t--)
49
+ solve ();
50
+ return 0 ;
51
+ }
0 commit comments