#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 5e5 + 555;

char ori[maxn];
bool solve(){
    scanf("%s", ori + 1);
    int len = strlen(ori + 1);
    map<char, int>ma;
    for(int i = 1; i <= len; i++){
        ma[ori[i]] = i;
    }
    int posl = ma['a'];
    int posr = ma['a'];
    if(ma['a'] == 0)
        return false;
    for(int i = 1; i < len; i++){
        char nowc = 'a' + i;
        int nowpos = ma[nowc];
        if(posr + 1 == nowpos)
            posr++;
        else if(nowpos >= 1 && nowpos + 1 == posl)
            posl--;
        else
            return false;
    }
    return true;
}

signed main(){
    #ifndef ONLINE_JUDGE
        freopen("in.txt", "r", stdin);
    #endif // ONLINE_JUDGE
    int T = 1;
    cin>>T;
    while(T--){
        if(solve())
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
}
