#include <bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        string s;
        cin >> s;
        int i = 0, j = s.length() - 1;
        int k = 0;
        char c = (s.length() - 1) + 'a';
        while (c >= 'a')
        {
            if (s[i] == c)
                i++;
            else if (s[j] == c)
                j--;
            else
            {
                k = 1;
                break;
            }
            c--;
        }
        if (k == 1)
        {
            cout << "NO" << endl;
        }
        else
            cout << "YES\n";
    }
    return 0;
}