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.util.*;

public class TT {

    static Uzi uzi;
    static int counter = 0;
    static long[] dp;

    public static void main(String[] args) throws IOException {
        FastReader fk = new FastReader();
//        Scanner fk = new Scanner(System.in);
        PrintWriter pr = new PrintWriter(System.out);
        //FileWriter wr = new FileWriter("output.txt");
//        uzi = new Uzi();

        int mod = 5;
        int t = fk.nextInt();

        while(t-- > 0){
            String s = fk.next();
            int len = s.length();
            int l = -1, r;

            for(int i =0; i<len; i++){
                if(s.charAt(i) == 'a') {
                    l = i;
                    break;
                }
            }
            r = l;
            if(l == -1)
                pr.println("NO");
            else
                pr.println(fxn(s, l,r));

        }

        pr.close();

    }

    private static String fxn(String s, int l, int r){
        int len = s.length();
        if(len == 1)
            return "YES";

        for(int i =1; i<len; i++){
            char c = (char) ('a' + i);
            if(l >0 && s.charAt(l-1) == c)
                l = l-1;
            else if(r < len-1 && s.charAt(r+1) == c)
                r = r+1;
            else
                return "NO";
        }
        return "YES";
    }
}


class Uzi {
    boolean[] primes;
    int N;
    long[] fact;

    public Uzi(){}

    public Uzi(int n) {
        this.N = n;
        this.primes = new boolean[N + 1];
        this.fact = new long[N+1];
    }

    public int fast_exponentiation(int n, int b, int mod){
        // Time complexity: O(logn), Space complexity: O(1)
        int res = 1;
        while(b > 0){
            res = (res * (b%2 == 1? n : 1)) % mod;
            n = (n*n) % mod;
            b >>= 1;
        }

        return res;

    }

    public void fact(){
        fact[0] = 1;

        for(int i =1; i<= N; i++){
            fact[i] = i*fact[i-1];
        }
    }

    public long gcd(long a, long b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }

    public void seive() {
        Arrays.fill(primes, true);
        primes[0] = primes[1] = false;

        for (int i = 2; i * i <= N; i++) {
            if (primes[i]) {
                for (int j = i * i; j <= N; j += i)
                    primes[j] = false;
            }
        }
    }

    public int countDivisors(long num) {
        int counter = 0;

        for (int i = 1; i < Math.sqrt(num); i++) {
            if (num % i == 0)
                counter += (i * i == num) ? 1 : 2;
        }
        return counter;
    }

    public boolean binary_search(int[] arr, long key) {
        int s = 0, e = arr.length - 1, curr;

        while (s <= e) {
            curr = (s + e) / 2;
            if (arr[curr] == key)
                return true;
            else {
                if (arr[curr] > key)
                    e = curr - 1;
                else
                    s = curr + 1;
            }
        }

        return false;
    }

    private int elementJustGreater(int[] arr, int k) {
        // to find the first arr[i] >= k using binary search

        int s = 0, e = arr.length - 1, curr;
        int ans = -1;

        while (s <= e) {
            curr = (s + e) / 2;
            if (arr[curr] >= k) {
                ans = arr[curr];
                e = curr - 1;
            } else
                s = curr + 1;
        }

        return ans;
    }

    public int[] elementJustSmaller(int[] arr, long k) {
        // to find the first arr[i] <= k using binary search
        int s = 0, e = arr.length - 1, curr;
        int[] ans = {-1, 0};

        while (s <= e) {
            curr = (s + e) / 2;
            if (arr[curr] <= k) {               // should be less than or equal to
                //ans = arr[curr];
                if(arr[curr] == k)
                    ans = new int[]{curr, 0};
                else
                    ans = new int[]{curr, 1};
                s = curr + 1;
            } else
                e = curr - 1;
        }
        return ans;
    }

    private void fxn(int[] arr, int n) {
        Stack<Integer> stack = new Stack<>();
        int[] output = new int[n];
        int index, curr;

        for (int i = 0; i < n; i++) {
            curr = arr[i];
            while (!stack.isEmpty() && arr[stack.peek()] <= curr) {
                index = stack.pop();
                output[index] = curr;
            }

            stack.push(i);
        }

        while (!stack.isEmpty()) {
            index = stack.pop();
            output[index] = -1;
        }

        System.out.println(Arrays.toString(output));
    }
}

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 (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

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

    String nextLine() {
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}



