# include <iostream>
# include <algorithm>
# include <string>
using namespace std;

int n;

int main()
{
    cin >> n;
    while(n--)
    {
        string ch;
        cin >> ch;
        int k = ch.size() - 1;
        int i = 0;
        for(; i <= k ; i++)
        {
            if(ch[i] == 'a')
            {
                break;
            }
        }
        if(ch[i] != 'a')
        {
            cout << "NO" << endl;
            continue;
        }
        int l = i,r = i;
        char t = 'a';
        bool flag = true;
        while(l > 0 || r < k)
        {
            if(l > 0 && ch[l - 1] == t + 1)
            {
                //printf("啦啦啦%c %c",ch[l - 1], t +1);
                l = l - 1;
                t = t + 1;
                continue;;
            }
            if(r < k && ch[r + 1] == t + 1)
            {
                r = r + 1;
                t = t + 1;
                continue;
            }
            flag = false;
            break;
        }
        if(flag)
        {
            cout << "YES" << endl;
        }
        else
        {
            cout << "NO" << endl;
        }
    }
    return 0;
}
