#include<bits/stdc++.h>

using namespace std;

#define fo(i, n) for(i=0;i<n;i++)


void solve() {
	string s;
	cin >> s;
	int i ;
	int n = s.size();
	for(i=0;i<n;i++) {
		if(s[i] == 'a') break;
	}
	if(i==n) {
		cout << "NO\n";
		return;
	}
	if(n>26) {
		cout << "NO\n";
		return;
	}
	int left = i;
	int right = i;
	for(int j = 1; j<n;j++) {
		char c = 'a'+j;
		if(left -1 >= 0 && s[left-1] == c) {
			left--;
		}
		else if(right +1 <n && s[right+1]==c) {
			right++;
		}
		else {
			cout << "NO\n";
			return;
		}
	}
	cout << "YES\n";
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);

    int tc = 1;
    cin >> tc;
    while(tc--) {
        solve();
    }

}