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