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.
// package com.company

/*
 * @author :: Yuvraj Singh
 * CS UNDERGRAD AT IT GGV BILASPUR
 */

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.lang.System.out;
import static java.lang.Long.MAX_VALUE;

public final class Main{

    FastReader in;
    StringBuffer sb;
    public static void main(String[] args) {
        new Main().run();
    }

    void run(){
        in= new FastReader();
        start();
    }

    void start(){
        sb= new StringBuffer();
        for(int t=in.nextInt();t>0;t--)
            solve();

        out.print(sb);
    }

    long MOD= 1000000007;
    void solve(){
        String s= "abcdefghijklmnopqrstuvwxyz";
        char[] str= s.toCharArray();
        char[] k = in.nextLine().toCharArray();
        HashSet<Character> set= new HashSet<>();
        for(char c: k) set.add(c);
        for(int i = 0; i<k.length; i++) {
            if(!set.contains(str[i])) {
                sb.append("NO").append("\n");
                return;
            }
        }
        int i = 0;
        int j = k.length-1;
        int h = k.length-1;
        while(i<=j) {
            if(k[i] == str[h]) {
                i++;
            }
            else if(k[j]==str[h]) {
                j--;
            }
            else {
                sb.append("NO").append("\n");
                return;
            }
            h--;
        }
        sb.append("YES").append("\n");
    }

    int upper_bound(long[] arr, int key) {
        int i=0, j=arr.length-1;
        if (arr[j]<=key) return j+1;
        if(arr[i]>key) return i;
        while (i<j){
            int mid= (i+j)/2;
            if(arr[mid]<=key){
                i= mid+1;
            }else{
                j=mid;
            }
        }
        return i;
    }

    void sort(long[] A){
        int n = A.length;
        Random rnd = new Random();
        for(int i=0; i<n; ++i){
            long tmp = A[i];
            int randomPos = i + rnd.nextInt(n-i);
            A[i] = A[randomPos];
            A[randomPos] = tmp;
        }
        Arrays.sort(A);
    }

    long[] longArr(int n){
        long[] res= new long[n];
        for(int i=0;i<n;i++){
            res[i]= in.nextLong();
        }
        return res;
    }

    // sieve of eratosthenes code for precomputing whether numbers are prime or not up to MAX_VALUE
    long MAX= MAX_VALUE;
    int[] precomp= new int[(int) (MAX+1)];
    void sieve(){
        long n= MAX;
        boolean[] prime = new boolean[(int) (n+1)];
        for(int i=0;i<=n;i++)
            prime[i] = true;

        for(long p = 2; p*p <=n; p++)
        {
            // If prime[p] is not changed, then it is a prime
            if(prime[(int) p])
            {
                // Update all multiples of p
                for(long i = p*p; i <= n; i += p)
                    prime[(int) i] = false;
            }
        }

        // Print all prime numbers
        for(long i = 2; i <= n; i++)
        {
            if(prime[(int) i])
                precomp[(int) i]= 1;
        }
    }

    boolean isDigitSumPalindrome(long N) {
        // code here
        long sum= sumOfDigits(String.valueOf(N));
        long rev=0;
        long org= sum;
        while (sum!=0){
            long d= sum%10;
            rev = rev*10 +d;
            sum /= 10;
        }
        return org == rev;
    }

    long sumOfDigits(String n){
        long sum= 0;
        for (char c: n.toCharArray()){
            sum += Integer.parseInt(String.valueOf(c));
        }
        return sum;
    }

    long[] revArray(long[] arr) {
        int n= arr.length;
        int i=0, j=n-1;
        while (i<j){
            long temp= arr[i];
            arr[i]= arr[j];
            arr[j]= temp;
            i++;
            j--;
        }
        return arr;
    }

    long gcd(long a, long b){
        if (b==0)
            return a;
        return gcd(b, a%b);
    }
    long lcm(long a,long b){
        return (a*b)/gcd(a,b);
    }

    static class Pair{
        long first;
        long second;
        Pair(long x,long y){
            this.first=x;
            this.second=y;
        }
    }

    static class Compare {
        static void compare(ArrayList<Pair> arr, long n) {
            arr.sort(new Comparator<Pair>() {
                @Override
                public int compare(Pair p1, Pair p2) {
                    return (int) (p1.first - p2.first);
                }
            });
        }
    }

    public static class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){
            br=new BufferedReader(new InputStreamReader(System.in));
        }
        String next(){
            while (st==null || !st.hasMoreElements()){
                try{
                    st=new StringTokenizer(br.readLine());
                }catch (Exception e){
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt(){
            return Integer.parseInt(next());
        }
        long nextLong(){
            return Long.parseLong(next());
        }
        double nextDouble(){
            return Double.parseDouble(next());
        }
        float nextFloat(){
            return Float.parseFloat(next());
        }
        String nextLine(){
            String str="";
            try{
                str=br.readLine();
            }catch (Exception e){
                e.printStackTrace();
            }
            return str;
        }
    }
}