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

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin>>t;
    while(t--){
        string s;
        cin>>s;
        int left=0;
        int right=s.size()-1;
        int i=s.size()-1;
        string ans="YES";
        while(left<=right){
            if(s[left]==(char)(i+'a')) left++;
            else if(s[right]==(char)(i+'a')) right--;
            else {
                ans="NO";
                break;
            }
            i--;
        }
        cout<<ans<<"\n";
    }
}
