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.


import java.io.*;
import java.nio.file.ReadOnlyFileSystemException;
import java.sql.Ref;
import java.sql.ResultSetMetaData;
import java.util.*;
import java.util.StringTokenizer;
public class Main {
    public static void main(String[] args) throws IOException {

        Reader.init(System.in);
        int t = Reader.nextInt();
        while ( t > 0) {
            String a = Reader.next();
            char[] array = a.toCharArray();
            int index [] = new int[26];
            int count [] = new int[26];
            int i = 0;
            int len = array.length;
            while ( i < len){
                count[array[i]-'a'] +=1;
                index[array[i]-'a'] = i;
                i++;
            }
           /*i  = 0;
           while ( i < len){
               System.out.print(count[i]+" ");
               i++;
           }
           System.out.println();*/
            boolean ans = true;
            i = 0;
            String s = "";
            while ( i < len){

                if ( count[i] == 0 || count[i] > 1){
                    ans = false;
                    break;
                }
                else{
                    if ( i == 0){
                        s = "a";
                    }
                    else{
                        if ( index[i]  > index[i-1]){
                            s = s + array[index[i]];
                        }
                        else{
                            s = array[index[i]] + s;
                        }
                    }
                }
                i++;
            }
            if (! ans){
                System.out.println("NO");
            }
            else{
                if ( s.equals(a)){
                    System.out.println("YES");
                }
                else{
                    System.out.println("NO");
                }
            }
            t--;
        }
    }
    public static int abs(int a,int b){
        if ( a > b){
            return a-b;
        }
        else{
            return b-a;
        }
    }
    public static  long max(long a,long b){
        return a > b ? a: b;
    }
    public static long bestOfThree(int a,int b,int c){
        boolean one = true;
        boolean two = true;
        boolean three = true;
        if ( a%2 == 0){
            one = false;
        }
        if ( b%2 == 0){
            two = false;
        }
        if ( c%2 == 0){
            three = false;
        }
        if ( one && two && three){
            return (a/2)+(b/2)+(c/2)+1;
        }
        else if ( one && two){
            long ans = (c/2)+1+(a/2)+(b/2);
            return  ans;
        }
        else if ( two && three){
            long ans = (a/2)+1+(c/2)+(b/2);
            return  ans;
        }
        else if ( one && three){
            if ( b > 0){
                return (a/2)+(b/2)+(c/2)+1;
            }
            else{
                return (a/2)+(b/2)+(c/2);
            }
        }
        else if (one || two || three){
            long ans = (a/2)+(b/2)+(c/2);
            return ans;
        }
        else{
            long ans = (a/2)+(b/2)+(c/2);
            return ans;
        }
    }
    public static long bestOfTwo(int a,int b){
        if ( a%2 == 1 && b%2 == 1){
            return (a/2)+(b/2)+1;
        }
        else{
            return (a/2)+(b/2);
        }
    }
    public static long bestOfOne(int a){
        return a/2;
    }

    public static long answer(OBJECT[] array,long[][] optimal,int n,int l){
        int i = 0;
        int j = 0;
        int count = 1;
        while ( j < l+1){
            optimal[0][j] = count*array[0].cost;
            if ( j == count*array[0].liter){
                count++;
            }
            j++;
        }
        i = 1;
        while ( i < n){
            count = 1;
            j = 0;
            while ( j < l+1){
                if ( j <= count*array[i].liter){
                    int liter = array[i].liter;
                    if ( j >= array[i].liter) {
                        optimal[i][j] = min(optimal[i - 1][j], min(count * array[i].cost, (optimal[i][j - liter] + array[i].cost)));
                    }
                    else{
                        optimal[i][j]= min(optimal[i-1][j],count*array[i].cost);
                    }
                    if ( j == count*array[i].liter){
                        count++;
                    }
                }
                j++;
            }
            i++;
        }
        return optimal[n-1][l];
    }
    public static long min(long a,long b){
        return a < b ? a: b;
    }
    public static long sum(long n){
        return  (n*(n+1))/2;
    }
    public static void copy(int i,int j,int[][] arr){
        int k= 0;
        while (k < 26){
            arr[j][k] = arr[i][k];
            k++;
        }
    }
    public static long answer(int i,int j,int[][] arr){
        long ans = 0;
        int k = 0;
        while ( k <26){
            ans += ((arr[j][k]-arr[i][k])*(k+1));
            k++;
        }
        return ans;
    }
}

class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }
    static long nextLong() throws IOException {
        return Long.parseLong( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
}


class OBJECT{
    int liter;
    int cost;
    OBJECT(int l,int c){
        liter = l;
        cost = c;
    }

}

class  comp implements Comparator<Integer>{

    @Override
    public int compare(Integer o1, Integer o2) {
        if( o2 > o1){
            return 1;
        }
        return -1;
    }
}
