#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
	int t;
	cin>>t;
	while(t--)
	{
		cin>>s;
		int tot=s.size();
		while(tot)
		{
			if(s[0]=='a'+tot-1)s.erase(0,1);
			else if(s[tot-1]=='a'+tot-1)s.erase(tot-1,1);
			tot--;
		}
		if(s=="")cout<<"YES\n";
		else cout<<"NO\n";
	}
	return 0;
}