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.util.*;
 
 
import static java.lang.Math.min;
import static java.lang.Math.abs;
import static java.lang.Math.max;
import java.io.*;
 
public class Codechef {
	static long[] mods = {1000000007, 998244353, 1000000009};
	static long mod = mods[0];
	public static MyScanner in;
    public static PrintWriter out;
    static int[][] dp;
    
    
	public static void main( String[] args ) throws IOException{
		
 		in = new MyScanner();
 		out = new PrintWriter(System.out);
 		StringBuilder ans1=new StringBuilder();
		int test=in.nextInt();
		while(test-->0) {
			
			//StringBuilder ans=new StringBuilder();
			String ans="";
			char ch[] =in.next().toCharArray();
			
			boolean flag=false;
			int left=0,right=0;
			
			for(int i=0; i<ch.length;i++) {
				if(ch[i]=='a') {
					flag=true;
					left=i;
					right=i;
					break;
				}
			}
			
			if(flag) {
				int k=1;
				flag=true;
				//out.println(left+" "+right);
				while(true) {
			          char c=(char)('a'+(k++));
					if(left==0 && right==ch.length-1){
					     flag=true;
					     break;
					}
					else if(left>0 && ch[left-1]==c) {
						
						left--;
						//out.println("left "+left+" "+(char)('a'+(k-1)));
						
					}else if(right<ch.length-1 && ch[right+1]==c) {
						
						right++;
						//out.println("right "+right+" "+(char)('a'+(k-1)));
					
					}else {
						
						flag=false;
						break;
						
					}
					
				}
				
				if(flag)	ans="YES";
				else	ans="NO";
				
				
			}else {
				ans="NO";
			}
			
			ans1.append(ans).append(System.getProperty("line.separator"));
		}
		
		out.println(ans1);
 		out.close();
 		
 	}
	
	
 
	//comparator to solve according to b in descending order
	static class Pair implements Comparable<Pair>{
		private long a;
		private long b;
		public Pair(long a, long b) {
			this.a = a;
			this.b = b;
		}
		public int compareTo(Pair other) {
			return Long.compare(this.b, other.b );		//to sort in ascending order swap the arguments in Long.compare
			//return Long.compare(other.b ,this.b); 	//to sort in descending order swap the arguments in Long.compare
		}
	}
	
	static void printArray(long[] a) {
		StringBuilder stringBuilder=new StringBuilder();
		for(long i: a)	stringBuilder.append(i).append(" ");
		out.println(stringBuilder);
	}
	
	public static void sort(long[] array){
		ArrayList<Long> copy = new ArrayList<>();
		for (long i : array)
			copy.add(i);
		Collections.sort(copy);
		for(int i = 0;i<array.length;i++)
			array[i] = copy.get(i);
	}
	
	public static void sortDes(long[] array){
		ArrayList<Long> copy = new ArrayList<>();
		for (long i : array)
			copy.add(i);
		Collections.sort(copy);
		int j=array.length-1;
		for(int i = 0;i<array.length;i++)
			array[j--] = copy.get(i);
	}
	
	
	static String[] readArrayString(int n){
		String[] array = new String[n];
		for(int j =0 ;j<n;j++)
			array[j] = in.next();
		return array;
	}
	
	
	static int[] readArrayInt(int n){
    	int[] array = new int[n];
    	for(int j = 0;j<n;j++)
    		array[j] = in.nextInt();
    	return array;
    }
	
	static int[] readArrayInt1(int n){
		int[] array = new int[n+1];
		for(int j = 1;j<=n;j++){
			array[j] = in.nextInt();
		}
		return array;
	}
	
	static long[] readArrayLong(int n){
		long[] array = new long[n];
		for(int j =0 ;j<n;j++)
			array[j] = in.nextLong();
		return array;
	}
	
	static double[] readArrayDouble(int n){
		double[] array = new double[n];
		for(int j =0 ;j<n;j++)
			array[j] = in.nextDouble();
		return array;
	}
	
	static int minIndex(int[] array){
		int minValue = Integer.MAX_VALUE;
		int minIndex = -1;
		for(int j = 0;j<array.length;j++){
			if (array[j] < minValue){
				minValue = array[j];
				minIndex = j;
			}
		}
		return minIndex;
	}
	
	static int minIndex(long[] array){
		long minValue = Long.MAX_VALUE;
		int minIndex = -1;
		for(int j = 0;j<array.length;j++){
			if (array[j] < minValue){
				minValue = array[j];
				minIndex = j;
			}
		}
		return minIndex;
	}
	
	static int minIndex(double[] array){
		double minValue = Double.MAX_VALUE;
		int minIndex = -1;
		for(int j = 0;j<array.length;j++){
			if (array[j] < minValue){
				minValue = array[j];
				minIndex = j;
			}
		}
		return minIndex;
	}
	
	static long power(long x, long y){
		if (y == 0)
			return 1;
		if (y%2 == 1)
			return (x*power(x, y-1))%mod;
		return power((x*x)%mod, y/2)%mod;
	}
	static void verdict(boolean a){
        out.println(a ? "YES" : "NO");
    }
	
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;
        public MyScanner() {
            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;
        }
        
    }	
}