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

int main()
{
   int t;
   cin >> t;
   string s;
   while (t--)
   {
       cin >> s;
       int l = 0 , r=s.length()-1;
       char c = 'a' + char(s.length()-1);
       int flag = 0;
       while (l<=r)
       {
           if (s[l] == c)
           {
               //s.erase(l,1);
               l++;
               c--;
           }
           else if (s[r] == c)
           {
               //s.erase(r,1);
               r--;
               c--;
           }
           else
           {
               flag = 1;
               break;
           }
       }
       if (s.empty() or flag == 0)
           cout << "YES\n";
       else
           cout << "NO\n";
   }
}