#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define int long long
#define endl "\n"
using namespace std;


int32_t main() {

    fast
    int t;
    cin >> t;
    while(t--) {
        string s;
        cin >> s;
        int n = s.size();
        int aPos = -1;
        for(int i = 0; i < n; i++) {
            if(s[i] == 'a') {
                aPos = i;
                break;
            }
        }
        int cnt = 1;
        int leftPos = aPos - 1;
        int rightPos = aPos + 1;
        bool isPoss = true;
        for(int i = 1; i < n; i++) {
            char current = 'a' + i;
            for(int j = 0; j < n; j++) {
                if(s[j] == current) {
                    if(j == leftPos) {
                        cnt ++;
                        leftPos--;
                    } else if(j == rightPos) {
                        cnt ++ ;
                        rightPos++;
                    } else
                        isPoss = false;
                    break;
                }
            }
        }
        if(cnt != n || aPos == -1 )isPoss = false;
        cout << (isPoss ? "YES" : "NO") << endl;
    }

    return 0;
}