A string s of length n (1 ≤ n ≤ 26) is called alphabetical if it can be obtained using the following algorithm:

  * first, write an empty string to s (i.e. perform the assignment s := ""); 
  * then perform the next step n times; 
  * at the i-th step take i-th lowercase letter of the Latin alphabet and write it either to the left of the string s or to the right of the string s (i.e. perform the assignment s := c+s or s := s+c, where c is the i-th letter of the Latin alphabet). 



In other words, iterate over the n first letters of the Latin alphabet starting from 'a' and etc. Each time we prepend a letter to the left of the string s or append a letter to the right of the string s. Strings that can be obtained in that way are alphabetical.

For example, the following strings are alphabetical: "a", "ba", "ab", "bac" and "ihfcbadeg". The following strings are not alphabetical: "z", "aa", "ca", "acb", "xyz" and "ddcba".

From the given string, determine if it is alphabetical.

Input

The first line contains one integer t (1 ≤ t ≤ 10^4) — the number of test cases. Then t test cases follow.

Each test case is written on a separate line that contains one string s. String s consists of lowercase letters of the Latin alphabet and has a length between 1 and 26, inclusive.

Output

Output t lines, each of them must contain the answer to the corresponding test case. Output YES if the given string s is alphabetical and NO otherwise.

You can output YES and NO in any case (for example, strings yEs, yes, Yes and YES will be recognized as a positive answer).

Example

Input


11
a
ba
ab
bac
ihfcbadeg
z
aa
ca
acb
xyz
ddcba


Output


YES
YES
YES
YES
YES
NO
NO
NO
NO
NO
NO

Note

The example contains test cases from the main part of the condition.
#include<bits/stdc++.h>
#include<fstream>
#include <cstdlib> 
#define prime 1000000007
#define mod 998244353
#define pb push_back
#define lmin LLONG_MIN
#define mp make_pair
#define forn(i,a,b) for (int i = a; i <b; i++)
#define fornn(i,a,b) for (int i = a; i <=b; i++)
#define num 1000000000
#define ALL(v) v.begin(), v.end()
#define INF INT_MAX
#define MAX 1000000
#define min_priority_queue priority_queue <int, vector<int>, greater<int>>
typedef long long ll;
using namespace std;
 
#define WINPAUSE system("pause")                      
 

string getString(char x) 
{ 
     
    string s(1, x); 
  
    return s;    
}
ll max(ll a,ll b)
{
  if(b>a)
   return b;
   else
   {
     return a;
   }
   
}

ll factorial[500005];
 
void swap(int* a, int* b) 
{ 
    int temp; 
    temp = *a; 
    *a = *b; 
    *b = temp; 
} 
int visited[200005],par[200000],val[200000];
void DFS(ll n,vector<int> v[],int pa)
{  visited[n]=1;
   if(n==1)
   par[n]=pa;
   forn(i,0,v[n].size())
   {
     if(visited[v[n][i]]==0)
     {
       DFS(v[n][i],v,n);
     }
   }
   
}
 
void dfs(int n,vector<int> v[],int w)
{  visited[n]=1;
 
   par[n]=w;    
   forn(i,0,v[n].size())
   {
     if(visited[v[n][i]]==0)
     {
       dfs(v[n][i],v,n);
 
     }
   }
   
   
}
 
int  vitree(int n, vector<int> v[])
{  int count=0;
    visited[n]=1;
    forn(i,0,v[n].size())
    {
      if(visited[v[n][i]]==0)
     {
       count+=vitree(v[n][i],v);
     }  
    }
    if(count==0)
     { val[n]=1;
         return 1;
        
     }
    else
    { val[n]=count;
        return count;
    }
    
}
 
bool bipartite(int n,vector<int> v[],int co)
{
    visited[n]=1;
    val[n]=co;
    forn(i,0,v[n].size())
    {
        if(visited[v[n][i]]==0)
           {  bool m=bipartite(v[n][i],v,(co==1)?0:1);
               if(m==false)
                    return false;
                
           }
        else
        {
            if(val[v[n][i]]==co)
               return false;
                  
        }
        
    }
    return true;
 
}
 
  
ll modPow(ll  a, ll x, ll p) {
    //calculates a^x mod p in logarithmic time.
    ll res = 1;
    while(x > 0) {
        if( x % 2 != 0) {
            res = (res * a) % p;
        }
        a = (a * a) % p;
        x /= 2;
    }
    return res;
}
 
ll modInverse(ll a, ll p) {
    //calculates the modular multiplicative of a mod m.
    //(assuming p is prime).
    return modPow(a, p-2, p);
}
 
ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b); 
     
}
 

	bool cmp(pair<double,ll> a, pair<double,ll> b){
    if(a.first!=b.first)
		   return a.first > b.first;
    else
      return a.second<b.second;
	}
//int yu=10000001;
//int prim[10000001];


ll primeFactors(ll n)  
{  
    // Print the number of 2s that divide n  
    ll ans=1;
    int x=0;
    while (n % 2 == 0)  
    {  
        x++;
        n = n/2;  
    }  
    if(x%2==1)
      ans*=2;
  
    // n must be odd at this point. So we can skip  
    // one element (Note i = i +2)  
    for (int i = 3; i <= sqrt(n); i = i + 2)  
    {  
        // While i divides n, print i and divide n  
        x=0;
        while (n % i == 0)  
        {  
          x++;
            n = n/i;  
        }  
        if(x&1==1)
           ans*=i;
    }  
  
    // This condition is to handle the case when n  
    // is a prime number greater than 2  
    if (n > 2)  
        ans*=n;
 
      return ans; 
}    
 
inline ll ceil(ll x ,ll y)
   {
    return (x+y-1)/y;
   }
 
int num_dig(int n) 
{
   int count=0;
   while(n>0)
     {
       count++;
       n/=10;
     }
     return count;
}
 

 
int check_pal(string s, int n)
 {
   forn(i,0,n)
    {
      if(s[i]!=s[n-1-i] || s[i]=='?')
        return 0;
    }
    return 1;
 
 }
int check_dig(ll x)
  {
     int count=0;
     while(x>0)
       {
         count++;
         x/=10;
       }
       return count;
  }


bool isPerfectSquare(long  x)
{
    // Find floating point value of
    // square root of x.
    if (x >= 0) {
 
        long long sr = sqrt(x);
         
        // if product of square root
        //is equal, then
        // return T/F
        return (sr * sr == x);
    }
    // else return false if n<0
    return false;
}

int getFirstSetBitPos(int n)
{
    return log2(n & -n) + 1;
}

struct less_than_key
{
    inline bool operator() (const pair<ll,pair<ll,ll>>& struct1, const pair<ll,pair<ll,ll>>& struct2)
    {  if(struct1.first != struct2.first)
        return (struct1.first < struct2.first);
       else
         return (struct1.second.first < struct2.second.first);
    }
};

int segment[500005];

void buildtree(int v[],int ind, int l,int r)
  {
    if(l==r)
      {if(v[l]&1)
        segment[ind]=1;
       else 
        segment[ind]=0;
        return ;
      }
    
    int mid=(l+r)/2;

    buildtree(v,2*ind,l,mid);
    buildtree(v,2*ind+1,mid+1,r);

    segment[ind] = segment[2*ind]+segment[2*ind+1];
    return;
  }

int seg_query(int ind, int l, int r, int ql, int qr)
  {
    if(ql>r || qr<l)
      {
        return 0;

      }
    else if(l>=ql && r<=qr)
    return segment[ind];

    int mid=(l+r)/2;
    return seg_query(2*ind, l, mid,ql, qr) + seg_query(2*ind+1, mid+1, r,ql, qr);
  }

void update(int v[],int ind, int l, int r, int p)
   {
      if(l==r) 
       {if(v[l]&1)
       segment[ind]=1;
       else
        segment[ind]=0;
        return;
       }

      int mid=(l+r)/2;

      if(p<=mid)
        {
          update(v,2*ind, l,mid,p);
        }
      else
       update(v,2*ind+1,mid+1,r,p);

      segment[ind]=segment[2*ind]+segment[2*ind+1];
   }

bool isPowerOfTwo(ll n)
{
   if(n==0)
   return false;
 
   return (ceil(log2(n)) == floor(log2(n)));
}

int answ(ll n, ll a, ll b)
 { 
   if(n%b==1)
     return 1;

    fornn(i,0,n/b)
     {
       if((n-b*i)%a==0)
         {
           //if(answ((n-b*i)/a,a,b))
           //return 1;
           return answ((n-b*i)/a,a,b);
         }
     }
     return 0;
 }


int main()
 {ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    #ifndef ONLINE_JUDGE  
     freopen("input.txt","r",stdin);
     freopen("output.txt","w",stdout);
     freopen("log.txt", "w", stderr);
    #endif

   
    int T;
    cin>>T;

    while(T--)
      {
        string s;
        cin>>s;
        int n=s.length(),x=0,y=0,flag=0;

        forn(i,0,n)
          {
               if(s[i]=='a')
                {
                  x=i;
                  y=i;
                  flag=1;
                  break;
                }
          }
        if(flag)
         {
        for(char i='b';i<'a'+n;i++)
          { int f=1;
             forn(j,0,n)
               {
                 if(s[j]==i)
                   {
                        if(j==x-1)
                           {
                             f=0;
                             x--;
                             break;
                           }
                        else if(j==y+1)
                          {
                            f=0;
                            y++;
                            break;
                          }
                        else
                         { 
                           break;
                         }
                   }
               }
              if(f)
                {
                  flag=0;
                  break;
                }
          }


         }

         if(flag)
          cout<<"Yes\n";
         else
          cout<<"No\n";

      }

    
       
           
  
          









       
       
  
       

        










       

         
        
           
       
    
  

 
  //WINPAUSE;   
     return 0; 
    
}