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 <algorithm>
using namespace std;
 
#define int long long
#define ll long long
#define rep(i,a,b) for (int i = a; i < b; ++i)
#define mod 1000000007
#define F first
#define S second
#define printer(v) for(auto f: v) cout<<f<<" "
#define pb push_back
#define mp make_pair
#define all(c) c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define ipair pair<int,int> 
#define tr(container, it) for(typeof(container.begin()) it = container.begin(); it != container.end(); it++)

const int MAX_CHAR = 26;

int bin_power(int x, unsigned int y){   // Modular Exponentiation (Power in Modular Arithmetic)
    int temp;
    if( y == 0)
        return 1;
    temp = bin_power(x, y / 2);
    if (y % 2 == 0)
        return (temp * temp)%mod;
    else
        return (x * temp * temp)%mod;

    // ll res = 1; 
    // while(y){
    //     if(y & 1) res = (res * x)%mod; 
    //     y >>= 1; 
    //     x = (x * x)%mod;
    // }
    // return res;
}

int binarySearch(vector<int> Arr, int n, int target) {
    int start = 0, end = n - 1;
    while(start <= end) {
        int mid = (start + end) / 2;
        if(Arr[mid] == target) {
            return mid; 
        }
        else if(Arr[mid] < target) {   
            start = mid + 1;
        }
        else {
            end = mid - 1;
        }
    }
    return -1;
}

int inverse_mod(int a){
    return bin_power(a, mod - 2);
}

vector<bool> isPrime_Seive_Of_Erastothenes(long n){
    vector<bool> prime(n+1,true);
    prime[0] = prime[1] = false;
    for(long i=2;i*i<=n;i++){
        if(prime[i]){
            for(long j=i*i;j<=n;j+=i){
                prime[j] = false;
            }
        }
    }
    return prime;
}

bool is_integer(float k){
  return std::floor(k) == k;
}

int fact(int n);

int nCr(int n, int r) {
    if(r > n - r) r = n - r;
    int ans = 1;
    int i;
    for(i = 1; i <= r; i++) {
        ans *= n - r + i;
        ans /= i;
    }
    return ans;
}

int fact(int n){
    int res = 1;
    for (int i = 2; i <= n; i++){
        res = (res * i);
    }
    return res;
}

unsigned int gcd(unsigned int u, unsigned int v){       // Basic Euclidean Algorithm for GCD 
    int shift;
    if (u == 0) return v;
    if (v == 0) return u;          
    shift = __builtin_ctz(u | v);
    u >>= __builtin_ctz(u);
    do {
        v >>= __builtin_ctz(v);
        if (u > v) {
            unsigned int t = v;
            v = u;
            u = t;
        }  
        v = v - u;
    } while (v != 0);
    return u << shift;
}

// unsigned int gcd(unsigned int u, unsigned int v)
// {
//     // Base cases
//     // gcd(n, n) = n
//     if (u == v)
//         return u;
    
//     //  Identity 1: gcd(0, n) = gcd(n, 0) = n
//     if (u == 0)
//         return v;
//     if (v == 0)
//         return u;

//     if (u & 1) { // u is odd
//         if (v % 2 == 0) // v is even
//             return gcd(u, v / 2); // Identity 3
//         // Identities 4 and 3 (u and v are odd, so u-v and v-u are known to be even)
//         if (u > v)
//             return gcd((u - v) / 2, v);
//         else
//             return gcd((v - u) / 2, u);
//     } else { // u is even
//         if (v & 1) // v is odd
//             return gcd(u / 2, v); // Identity 3
//         else // both u and v are even
//             return 2 * gcd(u / 2, v / 2); // Identity 2
//     }
// }

int gcdExtended(int a, int b, int *x, int *y){      // Extended Euclidean Algorithm
    if (a == 0){
        *x = 0;
        *y = 1;
        return b;
    }
    int x1, y1;
    int gcd = gcdExtended(b%a, a, &x1, &y1);
    *x = y1 - (b/a) * x1;
    *y = x1;
    return gcd;
}

bool isPrime(int n)
{
    if (n <= 1)  return false;
    if (n <= 3)  return true;
    if (n%2 == 0 || n%3 == 0) return false;
    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return false;
    return true;
}

int nextPrime(int N)
{
    if (N <= 1)
        return 2;
    int prime = N;
    bool found = false;
    while (!found) {
        prime++;
        if (isPrime(prime))
            found = true;
    }
    return prime;
}

int countDistinctPermutations(string str){
    int length = str.length();
    int freq[MAX_CHAR];
    memset(freq, 0, sizeof(freq));
    for (int i = 0; i < length; i++)
        if (str[i] >= 'a')
            freq[str[i] - 'a']++;
    int x = 1;
    for (int i = 0; i < MAX_CHAR; i++)
        x = x * fact(freq[i]);
    return fact(length) / x; 
}

int calculateSum(int n){
    int sum = 0;
    sum = 2 << n;
    return sum;
}

string findSum(string str1, string str2){
    if (str1.length() > str2.length())
        swap(str1, str2);
    string str = "";
    int n1 = str1.length(), n2 = str2.length();
    reverse(str1.begin(), str1.end());
    reverse(str2.begin(), str2.end());
    int carry = 0;
    for (int i=0; i<n1; i++)
    {
        int sum = ((str1[i]-'0')+(str2[i]-'0')+carry);
        str.push_back(sum%10 + '0');
        carry = sum/10;
    }
    for (int i=n1; i<n2; i++)
    {
        int sum = ((str2[i]-'0')+carry);
        str.push_back(sum%10 + '0');
        carry = sum/10;
    }
    if (carry)
        str.push_back(carry+'0');
    reverse(str.begin(), str.end());
 
    return str;
}

 
string multiply(string num1, string num2){
    int len1 = num1.size();
    int len2 = num2.size();
    if (len1 == 0 || len2 == 0)
    return "0";
    vector<int> result(len1 + len2, 0);
    int i_n1 = 0;
    int i_n2 = 0;
    for (int i = len1 - 1; i >= 0; i--){ 
        int carry = 0;
        int n1 = num1[i] - '0';
        i_n2 = 0;            
        for (int j = len2 - 1; j >= 0; j--){
            int n2 = num2[j] - '0';
            int sum = n1*n2 + result[i_n1 + i_n2] + carry;
            carry = sum/10;
            result[i_n1 + i_n2] = sum % 10;
            i_n2++;
        }
        if (carry > 0)
            result[i_n1 + i_n2] += carry;
        i_n1++;
    }
    int i = result.size() - 1;
    while (i >= 0 && result[i] == 0) i--;
    if (i == -1) return "0";
    string s = "";
    while (i >= 0)
        s += to_string(result[i--]);
    return s;
}

string longDivision(string number, int divisor){
    string ans;
    int idx = 0;
    int temp = number[idx] - '0';
    while (temp < divisor)
        temp = temp * 10 + (number[++idx] - '0');
    while (number.size() > idx) {
        ans += (temp / divisor) + '0';
        temp = (temp % divisor) * 10 + number[++idx] - '0';
    }
    if (ans.length() == 0)
        return "0";
    return ans;
}

string findDiff(string str1, string str2){
    string str = "";
    int n1 = str1.length(), n2 = str2.length();
    reverse(str1.begin(), str1.end());
    reverse(str2.begin(), str2.end());
    int carry = 0;
    for (int i = 0; i < n2; i++) {
        int sub
            = ((str1[i] - '0') - (str2[i] - '0') - carry);
        if (sub < 0) {
            sub = sub + 10;
            carry = 1;
        }
        else
            carry = 0;
 
        str.push_back(sub + '0');
    }
    for (int i = n2; i < n1; i++) {
        int sub = ((str1[i] - '0') - carry);
        if (sub < 0) {
            sub = sub + 10;
            carry = 1;
        }
        else
            carry = 0;
 
        str.push_back(sub + '0');
    }
    reverse(str.begin(), str.end());
 
    return str;
}

void numberOfNodes(vector<vector<int> > edge, vector<int> &count, int s, int e){
    vector<int>::iterator u;
    count[s] = 1;
    int temp = 0;
    for(u = edge[s].begin(); u != edge[s].end(); u++){
        if (*u == e) continue;
        temp++;
    }
    if(temp == 0) return;
    for (u = edge[s].begin(); u != edge[s].end(); u++) {
        if (*u == e) continue;
        numberOfNodes(edge, count, *u, s);
        count[s] += count[*u];
    }
} 

int KthBit(int n, int k){
    return((n & (1 << (k - 1))) >> (k - 1)); 
}

void insertionSort(vector<int> arr, int n){
    int i, key, j;
    for (i = 1; i < n; i++){
        key = arr[i];
        j = i - 1;
        while (j >= 0 && arr[j] > key){
            arr[j + 1] = arr[j];
            j = j - 1;
        }
        arr[j + 1] = key;
    }
}

bool isPalindrome(int x){
    int l = 1;
    int r = 32;
    while (l < r){
        if(KthBit(x, r) == 0){
            r--;  
            continue;
        }
        if (KthBit(x, l) != KthBit(x, r)) return false;
        l++;
        r--;
    }
    return true;
}

signed main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
	int T;
    cin>>T;
    while(T--){
        string s;
        cin>>s;
        int n = s.length();
        int index = -1;
        for(int i = 0; i < n; i++){
            if(s[i] == 'a') index = i;
        }
        if(index == -1){
            cout<<"NO"<<endl;
            continue;
        }
        bool flag = false;
        int i = index - 1, j = index + 1;
        char ch = 'b';
        while(i >= 0 || j < n){
            if(s[i] == ch && i >= 0){
                i--;
            }
            else if(s[j] == ch && j < n){
                j++;
            }
            else{
                flag = true;
                break;
            }
            ch++;
        }
        if(flag == false) cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}