#include <bits/stdc++.h>
using namespace std;

int main() {


    int t = 1;
    cin >> t;

    while(t--) {
        string s;
        cin >> s;
        int flag = 0, len = s.size();
        for(int i = len - 1; i >= 0; i--) {
            char c = i + 97;
            if(s[0] == c) s = s.substr(1, s.size() - 1);
            else if(s[s.size() - 1] == c) s = s.substr(0, s.size() - 1);
            else {
                flag = 1;
                break;
            }
        }
        if(flag) cout << "NO" << endl;
        else cout << "YES" << endl;
    }

    return 0;
}