#include <bits/stdc++.h>
#define ll long long

using namespace std;

bool solve(string s){
    int n=s.size();
    auto l = s.find('a');
    if(l==string::npos) return false;
    auto r=l;

    for(int i=1; i<n; i++){
        auto pos = s.find('a'+i);
        if(pos==string::npos || (pos!=l-1) && (pos != r+1)) return false;
        else{
            l=min(l, pos);
            r=max(r, pos);
        }
    }
    return true;
}

int main() {

    int t; cin >> t;

    while(t--){
        string s; cin >> s;
        
        if(solve(s)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }

    }

    return 0;
}