#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std ;
#define int long long
#define pb push_back
#define ff first
#define ss second
#define inf 2e18
#define poke ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL) ;
int32_t main() {
    poke;
    int t;
    cin >> t ;
    while(t -- ){
        string s ;
        cin >> s ;
        int n = s.length() ;
        int l =-1,r =-1;
        for(int i = 0; i <n ;i++){
            if(s[i] == 'a'){
                l = i,  r = i ;
            }
        }
        if(l == -1){
            cout << "NO\n";
            continue ;
        }
        string res = "YES" ;
        int cnter = 1;
        while(cnter < n){
            bool f = false ;
            if( (l-1 >= 0 && s[l-1] == ('a'+cnter) ) ){
                f = true ;
                l--;
            }
            if( (r+1 < n && s[r+1] == ('a'+cnter) ) ){
                f = true ;
                r++;
            }
            if(!f){
                res = "NO" ;
                break ;
            }
            cnter ++ ;
        }
        cout << res << "\n" ;
    }
    return 0 ;
}
