#include<bits/stdc++.h>
using namespace std;
int main()
{
	int t;
	cin>>t;
	while(t--)
	{
		string s;
		cin>>s;
		map<char,int>m1,m2;
		vector<int>v(26,0);
		int i,flag=0,x=300,f=0,g=0;
		for(i=0;i<s.size();i++)
		{
			v[s[i]-'a']++;
			if(s[i]=='a')
				flag=1;
			else if(flag==0)
				m1[s[i]]=i;
			else
				m2[s[i]]=i;
		}
		for(i=1;i<26;i++)
		{
			if(v[i]>1||v[i]>v[i-1])
			{
				flag=0;
				break;
			}
		}
		if(v[0]>1)
		    flag=0;
		for(auto it=m1.begin();it!=m1.end();it++)	
		{
			if(it->second>x)
			{
				f=1;
				break;
			}
			x=it->second;
		}
		x=-1;
		for(auto it=m2.begin();it!=m2.end();it++)	
		{
			if(it->second<x)
			{
				g=1;
				break;
			}
			x=it->second;
		}
		if(f==1||g==1||flag==0)
    		cout<<"NO"<<endl;
    	else
    	    cout<<"YES"<<endl;
	}
    return 0;
}
