/*------------------------------------------------------
                 Name : Md Tushar Ahmed
--------------------------------------------------------*/
#include <iostream>
#include<bits/stdc++.h>
typedef long long int ll;
using namespace std;

int main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        string s;
        cin>>s;
        int k=-1;
        int ans=0;
        for(int i=0;i<=s.size();i++)
        {
            if(s[i]=='a')
            {
                k=i;
                break;
            }
        }
        if(k==-1)
        {
            cout<<"NO\n";
        }
        else
        {
            int i=k-1;
            int j=k+1;
            char ch='b';
            while(i>=0 || j<s.size())
            {
                if(s[i]==ch)
                {
                    ch++;
                    i--;
                }
                else if(s[j]==ch)
                {
                    ch++;
                    j++;
                }
                else
                {
                    ans=1;
                    break;
                }
            }
            if(ans==1)
              cout<<"NO\n";
            else
              cout<<"YES\n";
        }
    }

    return 0;
}
