#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--) {
string s, ss = "ABCDEFGHIJKLM";
cin >> s;
sort(s.begin(), s.end());
if (s == ss) {
cout << "YES" << endl;
continue;
}
cout << "NO" << endl;
}
return 0;
}