#include <iostream>
#include <bits/stdc++.h>

using namespace std;

void init()
{
    cin.tie(0);
    cin.sync_with_stdio(0);
}

int main()
{
    //freopen("elevator.in", "r", stdin);
    //freopen("output.txt", "w", stdout);
    init();
    int t; cin >> t;
    while (t --)
    {
        string s; cin >> s;
        int len = s.length();
        char c = 'a' + char(len-1);
        int left = 0, right = len - 1;
        bool cases = true;
        for (int i = 0; i < len; ++i)
        {
            if (s[left] == c)
            {
                left ++;
                c--;
            }
            else if (s[right] == c)
            {
                right --;
                c--;
            }
            else
            {
                cases = false;
                break;
            }
        }
        if (cases)
            cout << "YES\n";
        else
            cout << "NO\n";
    }
    return 0;
}