#include <bits/stdc++.h>
typedef long long int lli;
using namespace std;

void solve(){
    string s;
    cin >> s;
    int pos = -100;
    int n = s.size();
    for (int i = 0; i < n; i++){
        if (s[i] == 'a'){
            pos = i;
        }
    }
    if (pos == -100){
        cout << "NO\n";
        return;
    }
    if (s == "a" || s == "ab" || s == "ba"){
        cout << "YES\n";
        return;
    }
    int i = pos - 1, j = pos + 1;
    char next = 'b';
    while (i >= -1 || j <= n){
        if (i == -1 && j == n){
            break;
        }
        //cout << "next: " << next << " i: " << i << " j: " << j << "\n";
        if (s[i] == next){
            i--;
            next++;
            continue;
        }
        else if (s[j] == next){
            j++;
            next++;
            continue;
        }
        else{
            cout << "NO\n";
            return;
        }
    }
    cout << "YES\n";
}

int main (){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    //t = 1;
    cin >> t;
    while (t--){
        solve();
    }
    return 0;
}