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>
 
using namespace std;
 
#define fo(i,n) for(int i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
 
#define int             long long
#define pqb             priority_queue<int>
#define ff              first
#define ss              second
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define vvi             vector<vi>
#define mii             map<int,int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
 
int mod_add(int x, int y, int m) {x = x % m; y = y % m; return (((x + y) % m) + m) % m;}
int mod_mul(int x, int y, int m) {x = x % m; y = y % m; return (((x * y) % m) + m) % m;}
int mod_sub(int x, int y, int m) {x = x % m; y = y % m; return (((x - y) % m) + m) % m;}
 
int fact(int n); 
int mpow(int base, int exp); 
void addEdge(vvi& g,int n, int m);
 
void c_p_c()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
 
 
//=====================================  MAIN  ======================================================
//=====================================  MAIN  ======================================================

bool check(string str,int n){
    vi freq(26,0);
    for(int i=0;i<n;i++){
        char ch = str[i];
        if(freq[ch-'a'] == 1 || (ch - 'a') >= n)return false;
        freq[ch-'a']++;
    }
    return true;
}
void solve(){
    int i,j,n=0,m;
    string str="";
    cin >> str;
    n = str.size();
    if(!check(str, n)){
        cout <<"NO\n";
        return;
    }

    int idx=0;
    for(int i=0;i<n;i++){
        if(str[i]=='a'){
            idx = i;
            break;
        }
    }

    bool ans=true;
    i=0;
    while(i!=idx){
        if(i-1>=0 && str[i-1]<str[i]){
            ans = false;
            break;
        }
        i++;
    }
    if(!ans){
        cout << "NO\n";
        return;
    }
    idx++;
    while(idx<n){
        if(str[idx] < str[idx-1]){
            ans = false;
            break;
        }
        idx++;
    }
    if(!ans){
        cout << "NO\n";
        return;
    }
    cout<<"YES\n";
}
 
int32_t main()
{
    c_p_c();
 
    w(x){
        solve();
    }
 
    // solve();
    return 0;
}
 
//=============================================================================================
 
int fact(int n)
{
    if (n == 0) return 1;
    return n * fact(n - 1);
}
 
int mpow(int base, int exp) {
    base %= mod;
    int result = 1;
    while (exp > 0) {
        if (exp & 1) result = (result * base) % mod;
        base = ((base) * base) % mod;
        exp >>= 1;
    }
    return result;
}
 
void addEdge(vvi &g, int u, int v){
	g[u].pb(v);
	g[v].pb(u);
}