#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
    int n;
    cin>>n;
    string s;
    getline(cin,s);
    while(n--)
    {
        bool flag=true;
        getline(cin,s);
        for(size_t i=0; i<s.size()&&flag; i++)
            if(isdigit(s[0])||!(isalnum(s[i])||s[i]=='_'))
                flag=false;
        cout<<(flag?"yes":"no")<<endl;
    }
    return 0;
}
