#include <bits/stdc++.h>
using namespace std;
#define ll long long 
int main()
{
	int t;
	cin>>t;
	while(t--){
		string s;
		cin>>s;

		int flag=1;
		int len=s.size();
		map<int,int>mp;
		for(int i=0;i<len;i++){
			mp[s[i]-'a']++;
			if(mp[s[i]-'a']>1){
				flag=0;
				break;
			}
			if(s[i]-'a'>=len){
				flag=0;
				break;
			}
			if(i==0||i==len-1)continue;
			if(s[i]>s[i-1]&&s[i]>s[i+1]){
				flag=0;
				break;
			}
			
		}
		if(flag)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
}