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 <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef long long int l;
#define M 1000000007
#define loop(i,n)           for(int i=0;i<n;i++)
// struct triplet
// {
//     l src;
//     l dest;
//     l weigh;
// };
l ce(l a , l b)
{
    if(a%b==0)
        return a/b;
    return(a/b)+1;
}
// l sum;
// l pa(int n)
// {
//     l cnt=0;
//     for(int i=1;i*i<=n;i++)
//     {
//         if(i*i==n)
//             sum+=i;
//         else if(n%i==0)
//             {
//                sum+=i;
//                sum+=(n/i);
//             }
 
//     }
//     return sum%M;
// }
l power(l x,l n)  //2^6 = (2^3)^2
{
    if(n==0)
        return 1;
    l val = power(x,n/2);
    if(n%2==0)
        return val*val;
    return val*val*x;

}
// int merge(int a[],int s,int m,int e)
// {
    
//     int inv=0;
//     int n1 = m-s+1;
//     int n2 = e-m;
//     int left[n1];
//     int right[n2];
//     for(int i=0;i<n1;i++)
//     {
//         left[i] = (a[i+s]);
//     }
//     for(int i=0;i<n2;i++)
//     {
//         right[i] = (a[m+i+1]);
//     }
//     l i=0,j=0,k=s;
//     while(i<n1&&j<n2)
//     {
//         if(left[i]<=right[j])
//         {
//             a[k++] = left[i++];
//         }
//         else{
//             a[k] = right[j++];
//             inv+=n1-i;
//         }
//     }
//     while(i<n1)
//     {
//         a[k++] = left[i];
//     }
//     while(j<n2)
//     {
//         a[k++] = left[j++];
//     }

//     return inv;
// }
// int merge_sort(int a[],int s, int e)
// {
//     int inv = 0;
//     if(s<e){
//     int m = s+(e-s)/2;
//     inv+=merge_sort(a,s,m);
//     inv+=merge_sort(a,m+1,e);
//     inv+=merge(a,s,m,e);
//     }
//     return inv;

// }
    
vector<int> singleNumber(vector<int>& nums) {
        int n=nums.size();
        int ans=0;
        for(int i=0;i<n;i++)
        {
            ans^=nums[i];
        }
        int val=ans;
        int pos=0;
        while(val>0){
            if(val&1){
                break;
            }
            pos++;
            val=val>>1;
        }
        int mask=1<<pos;
        // cout<<mask<<" "<<ans<<endl;
        int res1=0;
        for(int i=0;i<n;i++){
            if((mask&nums[i])>=1){
                // cout<<nums[i]<<" ";
                res1^=nums[i];
            }
        }
        // cout<<res1<<endl;
        int second=res1^ans;
        return {res1,second};
    }
void solve23()
{
     string ss;
            cin>>ss;
            int ptr=-1;
            int n=ss.size();
            loop(i,n){
                if(ss[i]=='a'){
                    ptr=i;
                    break;
                }
            }
            if(ptr==-1){
                cout<<"NO"<<"\n";
                return;
            }
            int i=ptr-1,j=ptr+1,curr=1;
            int res=1;
            while(i>=0||j<ss.length()){
                char x=ss[i],y=ss[j];
                if(i<0){x='*';}
                if(j>=ss.length())
                    {y='*';}
                char b='a'+curr;
                if(x==b){
                    i--;
                }
                else if(y==b){
                    j++;
                }
                else{
                    res=0;
                    break;
                }
                curr++;
            }
            if(res){
                cout<<"YES"<<"\n";
            }
            else{
                cout<<"NO"<<"\n";
            }
       }   
 

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output1.txt","w",stdout);
    #endif
 
 int t;
 cin>>t;
 while(t--)
 {
    for(int i=1;i<10;i++)
    {
        int x =1;
    }
    solve23();

        
    
}
}