#include<bits/stdc++.h>
using namespace std;
int main(){
    int t;
    cin>>t;
    
    while(t--){
    string s;
    cin>>s;
    
    int n = s.length();
    
    int i=0,j = n-1,k = n-1;
    char z = 'a';
    
    while(k>=0){
        if(s[i] == z+k)
        i++;
        else if(s[j] == z+k)
        j--;
        else
        break;
        
        k--;
    }
    
    if(k == -1)
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;
    
    }
    return 0;
}