#include <bits/stdc++.h>

using namespace std;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);

	int t;
	cin >> t;
	while (t--) {
		string s;
		cin >> s;
		int i = 0;
		while (i < s.size() && s[i] != 'a') i++;
		int j = i;
		for (char c = 'b'; c <= 'z'; ++c) {
			if (i > 0 && s[i - 1] == c)
				i--;
			else if (j + 1 < s.size() && s[j + 1] == c)
				j++;
			else break;
		}
		if (i == 0 && j + 1 == s.size()) cout << "YES\n";
		else cout << "NO\n";
	}
}