#include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll N = 2e5 + 5;
ll n;
string s;
void solve(){
	cin >> s;
	int temp = 1;
	int i = 0, j = 0;
	for (i;i<s.size();i++){
		if (s[i] == 'a') break;
	}
	j = i - 1;
	i++;
	for (int t = 1; t < s.size();t++){
		if (i == s.size()){
			if (s[j] - 'a' != temp) break;
			j--;
		}
		else if (j == -1){
			if (s[i] - 'a' != temp) break;
			i++;
		}
		else if (s[i] - 'a' == temp)i++;
		else if (s[j] - 'a' == temp) j--;
		else break;
		temp++;
	}
	if (i == s.size()&& j == -1) cout << "YES\n";
	else cout << "NO\n";

}
int main(int argc, char const *argv[])
{
	int t; cin >> t;
	while (t--){
		solve();
	}
    return 0;  
}