//garima_19 loves to code
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin>>t;
    //t=1;
    while(t--)
    {
       string s;
       cin>>s;
       int n=s.length();
       int i=0,j=n-1;
       char c='a'+(n-1);
       //cout<<c<<"\n";
       int f=0;
       while(i<=j)
       {
           if(s[i]!=c && s[j]!=c)
           {
               f=1;
               break;
           }
           if(s[i]==c)
           i++;
           else if(s[j]==c)
           j--;
           c--;
       }
       if(f)
       cout<<"NO\n";
       else
       cout<<"YES\n";
    }
    return 0;
}