#define IO                       \
    ios::sync_with_stdio(false); \
    cin.tie(0);                  \
    cout.tie(0)

#define debug(a) cout << #a << ':' << a << '\n'

#include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

const long long MOD = (int)1e9 + 7;
const int MAXN = (int)1e6 + 5;

void Solve() {
    string input;
    cin >> input;
    int n = input.size();
    while (!input.empty()) {
        if ((*input.begin()) == 'a' + n - 1) {
            input.erase(input.begin());
        } else if (input.back() == 'a' + n - 1) {
            input.pop_back();
        } else {
            cout << "NO\n";
            return;
        }

        n = input.size();
    }

    cout << "YES\n";
}

int main() {
    int t = 1;
    cin >> t;
    while (t--) {
        Solve();
    }
    return 0;
}