#include <iostream>

using namespace std;

int main() {
    int t; cin >> t;
    while(t--) {
        string s; cin >> s;
        bool bad = false;
        for (int i = 97; i < 97 + s.length(); i++) {
            char c = char(i);
            int a = s.find(c);
            if (a == -1) {
                cout << "NO" << endl;
                bad = true;
                break;
            }
        }
        if (bad) {
            continue;
        }
        int a = s.find('a');
        if (a == -1) {
            cout << "NO" << endl;
            continue;
        }
        bool good = true;
        char prev = 'a';
        for (int i = a + 1; i < s.length(); i++) {
            if (s[i] <= prev) {
                good = false;
                break;
            }
            prev = s[i];
        }
        prev = 'a';
        for (int i = a - 1; i >= 0; i--) {
            if (s[i] <= prev) {
                good = false;
                break;
            }
            prev = s[i];
        }
        if (good) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}
