#include <bits/stdc++.h>
using namespace std;
//ofstream cout("output.out");

#define fast() {ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);}
#define pb push_back
#define vi vector<int>
#define vl vector<ll>                   
#define vii vector<vector<int>>
#define mii map<int, int>
#define pii pair<int, int>
#define qii priority_que<int, vector<int>, greater<int>>                
#define For(i, n) for(int i = 0; i < n; ++i)
#define For1(i, n) for(int i = 1; i <= n; ++i)
#define Forlr(i, l, r) for(int i = l; i <= r; ++i)
#define Forrl(i, r, l) for(int i = r; i >= l; --i)
#define o(a) { cout << #a << ":" << (a) <<" ";}
#define ov(a) {For(i, a.size()) cout << a[i] <<" ";}
#define ovv(a) {For(i, a.size()) {For(j, a[i].size()) cout << a[i][j] <<" ";cout <<"\n";}}
using ll = long long;
int n, m, k, q;
const int INF = 1e9 + 5;
const int maxn = 2e5 + 5;
const ll mod = 998244353 ;
void solve(){
	string s;
	cin >> s;
	int n = s.length(), pos = -1;
	char ch = 'a';
	for(int i = 0; i < n; ++i){
		if(s[i] == ch) {pos = i; break;}
	}
	bool ok = 1;
	if(pos != -1){
	while(!s.empty()){
		if(s[pos] == ch){
			s.erase(s.begin() + pos);
			if(s.empty()) break;
			ch += 1;
			bool check = 0;
			if(pos && s[pos - 1] == ch) pos = pos - 1, check = 1;
			if(s[pos] == ch) check = 1;
			if(!check) {ok = 0; break;}
		}
	}
}
else ok = 0;
	if(!ok){
		cout <<"NO\n";
	}else {
		cout <<"YES\n";
	}
}
int main(){
	fast();
	int t = 1;
	cin >> t;
	while(t--){
		solve();
	}
}