#include<bits/stdc++.h>
using namespace std;

bool Sol(string s){
    int len = s.size();
    for(int i=len-1;i>=0;i--){
        int temp_size = s.size();
        char c = (char)i + 97;
        if(s[0] == c)
            s = s.substr(1);
        else if(s[temp_size-1] == c)
            s = s.substr(0,temp_size-1);
        else{
            return false;
        }
    }
    if(s.size() == 0)
        return true;
}

int main(){
    int t;
    cin>>t;
    while(t--){
        string s;
        cin>>s;
        if(Sol(s))
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    return 0;
}