#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <string>
#include <string.h>
#define INT_MAX 1987654321
typedef long long int ll;
using namespace std;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	int test; scanf("%d", &test);
	string str;
	bool isa, ans;
	while (test--) {
		cin >> str;
		bool isalpha[30] = { false };
		isa = false;
		ans = true;
		for (int i = 0; i < str.length(); i++) {
			isalpha[str[i] - 'a'] = true;
		}
		for (int i = 0; i < str.length(); i++) {
			if (!isalpha[i]) {
				ans = false;
				break;
			}
		}
		if (ans) {
			for (int i = 0; i < str.length() - 1; i++) {
				if (!isa && str[i] == 'a') isa = true;
				else if (!isa) {
					if (str[i] <= str[i + 1]) {
						ans = false;
						break;
					}
				}
				else {
					if (str[i] >= str[i + 1]) {
						ans = false;
						break;
					}
				}
			}
		}
		if (ans) cout << "YES" << '\n';
		else cout << "NO" << '\n';
	}
	return 0;
}