#include <bits/stdc++.h>
typedef long long ll;
#define InAHurry cin.tie(0)->sync_with_stdio(0);
using namespace std;
int main(){
InAHurry;
int t;
cin>>t;
string s, ss="ABCDEFGHIJKLM";
while(t--){
cin>>s;
sort(s.begin(),s.end());
if(s == ss)
cout<<"YES\n";
else
cout<<"NO\n";
}
return 0;
}