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>
      typedef  long long ll;
      #define mod 1000000007
      using namespace std;
      using namespace std;

      //segment tree open
      // void build(ll node,ll start,ll end,ll tree[],ll ar[]){
      //  if(start==end){
      //      tree[node]=ar[start];
      //      return;
      //  }
      //  ll mid;
      //      mid=start+(end-start)/2;
      //      build(2*node+1,start,mid,tree,ar);
      //      build(2*node+2,mid+1,end,tree,ar);
      //      tree[node]=tree[2*node+1]*tree[2*node+2];
      // }
      // ll query(ll node,ll start,ll end,ll tree[],ll ar[],ll l,ll r){
      //  if(start>r||end<l)
      //      return INT_MAX;
      //  else if(l<=start&&r>=end)
      //      return tree[node];
      //  ll mid;
      //      mid=start+(end-start)/2;
      //      ll p1=query(2*node+1,start,mid,tree,ar,l,r);
      //      ll p2=query(2*node+2,mid+1,end,tree,ar,l,r);
      //      return min(p1,p2);
          
      // }
      // void update(ll node,ll start,ll end,ll tree[],ll ar[],ll idx,ll val){
      //  if(start==end&&start==idx){
      //      ar[idx]+=val;
      //      tree[node]+=val;
      //      return;
      //  }
      //  ll mid;
      //  mid=start+(end-start)/2;
      //  if(start<=idx&&idx<=mid)
      //      update(2*node+1,start,mid,tree,ar,idx,val);
      //  else
      //      update(2*node+2,mid+1,end,tree,ar,idx,val);
      //  tree[node]=min(tree[2*node+1],tree[2*node+2]);
      // }
      // segment tree closed
      // void tdfs(int root,bool visited[],vector<int> g[],bool ans){
      //     if(visited[root])
      //     return;
      //     visited[root]=true;
      //     for(int i=0;i<g[root].size();i++){
      //         if(!visited[g[root][i]])
      //         tdfs(g[root][i],visited,g,ans);

      //     }
      // }
      // bool dfs(vector<int> g[], int N,int p[],int h[] )
      // {
      //     bool visited[N];
      //     memset(visited,false,sizeof(visited));
      //     bool ans=true;
      //     for(int i=0;i<N;i++){
      //         if(!visited[i])
      //          ans=tdfs(0,visited,g,ans);
      //     }
      //    return ans;
      // }
      // bool cmp(pair<ll,ll> &a,pair<ll,ll> &b){
      //       if(a.second/A!=b.second/A){
      //             return a.second/A<b.second/A;
      //       }
      //       return a.first<b.first;
      // }
      // ll gcd(ll a, ll b) 
      // { 
      //     if (b == 0) 
      //         return a; 
      //     return gcd(b, a % b); 
      // } 
      void temp(ll n){
        ll c=sqrt(n)+2;
      }
      ll calc(ll a[],ll n){
        temp(n);
        ll ans=0,add=0;
        for(ll i=2;i<n;i++){
          add+=a[i-2];
          ans-=(a[i]*(i-1));
          ans+=add;
        }
        return ans;
      }
      int main() {
          #ifndef ONLINE_JUDGE
               freopen("input.txt" , "r" , stdin);
               freopen("output.txt" , "w" , stdout);
           #endif
          
              int t;
              cin>>t;
              
              while(t--){
                string s;
                cin>>s;
                string t=s;
                int n=s.length();
                sort(t.begin(),t.end());
                bool f=false;
                int c=0;
                string temp="";
                int x,y;
                for(int i=0;i<n;i++){
                  if(s[i]=='a'){
                    c++;
                    x=i-1;
                    y=i+1;
                  }
                }
                if(c!=1){
                  cout<<"NO\n";
                }else{
                  temp+='a';
                  char c='a';
                  while(x>=0&&y<n){
                    if(s[x]-c==1){
                      temp+=s[x];
                      c=s[x];
                      x--;
                    }else if(s[y]-c==1){
                      temp+=s[y];
                      c=s[y];
                      y++;
                    }else{
                      f=true;
                      break;
                    }
                  }
                  if(f)
                  cout<<"NO\n";
                else{
                  f=false;
                  while(x>=0){
                    temp+=s[x];
                    x--;
                  }
                  while(y<n){
                    temp+=s[y];
                    y++;
                  }
                  for(int i=0;i<n-1;i++){
                    if(temp[i+1]-temp[i]!=1){
                      f=true;
                      break;
                    }
                  }
                  if(f)
                    cout<<"NO\n";
                  else
                    cout<<"YES\n";
                }
                }

                // cout<<temp<<"\n";
              }
              return 0;
      }