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.*;
import java.math.*;
import java.math.BigInteger; 
//import javafx.util.*; 
public final class B
{    
	static PrintWriter out = new PrintWriter(System.out); 
	static StringBuilder ans=new StringBuilder();
	static FastReader in=new FastReader();
	static ArrayList<pair> g[];
	static long mod=1000000007;
	static int depth[],D[],par[];
	static boolean set[];
	static long INF=Long.MAX_VALUE;
	static long dp[][];
	static long max=0;
	public static void main(String args[])throws IOException
	{  			
		int T=i();
		outer:while(T-->0)
		{
			char X[]=in.next().toCharArray();
			int N=X.length;
			int l=0,r=N-1;
			boolean f=true;
			char A[]=new char[N];
			char x='a';
			for(int i=0; i<N; i++)
			{
				A[i]=x;
				x=(char)(x+1);
				if(x>'z')x='a';				
			}
			//			
			int i=N-1;
			while(l<=r)
			{
				if(l==r)
				{
					if(X[l]!='a')
					{
						f=false;
					}
					break;
				}
				else
				{


					if(X[l]==A[i])l++;
					else if(X[r]==A[i])r--;
					else 
					{
						f=false;
						break;
					}
					i--;
				}
			}
			if(f)out.println("YES");
			else out.println("NO");
		}
		out.close();
	}
	static int compare(char x,char y)
	{
		if(x=='a' && y=='z')return 1;
		if(x=='z' && y=='a')return -1;
		return x-y;
	}
	static long f(int n,int p)
	{
		//		boolean leaf=true;
		long max=Long.MAX_VALUE,s=0;
		for(pair x:g[n])
		{
			int c=x.a; long w=x.w;

			if(c!=p)
			{
				f(c,n);
				dp[0][n]+=dp[0][c]+2*w;
				s+=dp[0][c];
			}			
		}
		//		System.out.println(n+" "+dp[0][n]);		
		for(pair x:g[n])
		{
			int c=x.a; long w=x.w;			
			if(c!=p)
			{
				max=Math.min(max, dp[0][n]+dp[1][c]-dp[0][c]-w);

				dp[1][n]=max;
			}
		}



		return Math.min(dp[0][n], dp[1][n]);

	}
	static int OR(int i,int j)
	{
		if(i>j)
		{
			int t=i;
			i=j;
			j=t;
		}
		System.out.println("OR "+i+" "+j);
		return i();
	}
	static int AND(int i,int j)
	{
		if(i>j)
		{
			int t=i;
			i=j;
			j=t;
		}
		System.out.println("AND "+i+" "+j);
		return i();
	}
	static int XOR(int i,int j)
	{
		if(i>j)
		{
			int t=i;
			i=j;
			j=t;
		}
		System.out.println("XOR "+i+" "+j);
		return i();
	}
	static boolean f(int i,int A[],int x)//this means i-1 par x tha so
	{
		return true;
	}
	static int max(int a,int b,int c,int d)
	{
		return Math.max(Math.max(a,b),Math.max(c,d));
	}

	static int f2(int l,int r,int index)
	{
		while(r-l>1)
		{
			int m=(l+r)/2;
			if(ask(index,m)==index)r=m;
			else l=m;
		}
		return r;
	}
	static long fact(long N)
	{
		long num=1L;
		while(N>=1)
		{
			num=((num%mod)*(N%mod))%mod;
			N--;
		}
		return num;
	}
	static boolean reverse(long A[],int l,int r)
	{
		while(l<r)
		{
			long t=A[l];
			A[l]=A[r];
			A[r]=t;
			l++;
			r--;
		}
		if(isSorted(A))return true;
		else return false;
	}
	static boolean isSorted(long A[])
	{
		for(int i=1; i<A.length; i++)if(A[i]<A[i-1])return false;
		return true;
	}
	static boolean isPalindrome(char X[],int l,int r)
	{
		while(l<r)
		{
			if(X[l]!=X[r])return false;
			l++; r--;
		}
		return true;
	}

	static long min(long a,long b,long c)
	{
		return Math.min(a, Math.min(c, b));
	}

	static void print(int a)
	{
		System.out.println("! "+a);
	}
	static int ask(int a,int b)
	{
		System.out.println("? "+a+" "+b);
		return i();
	}
	static int find(int a)
	{
		if(par[a]<0)return a;
		return par[a]=find(par[a]);
	}
	static void union(int a,int b)
	{
		a=find(a);
		b=find(b);
		if(a!=b)
		{
			par[a]+=par[b]; //transfers the size
			par[b]=a;       //changes the parent
		}
	}
	static void swap(char A[],int a,int b)
	{
		char ch=A[a];
		A[a]=A[b];
		A[b]=ch;
	}

	static void sort(long[] a) //check for long
	{
		ArrayList<Long> l=new ArrayList<>();
		for (long i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}
	static void setGraph(int N)
	{
		D=new int[N+1];
		par=new int[N+1];
		depth=new int[N+1];
		set=new boolean[N+1];
		g=new ArrayList[N+1];
		//		g1=new ArrayList[N+1];
		for(int i=0; i<=N; i++)
		{
			D[i]=N+1;
			par[i]=-1;
			g[i]=new ArrayList<pair>();
			//			g1[i]=new ArrayList<Integer>();
		}
	}

	static  long pow(long a,long b)
	{
		long mod=1000000007;
		long pow=1;
		long x=a;
		while(b!=0)
		{
			if((b&1)!=0)pow=(pow*x)%mod;
			x=(x*x)%mod;
			b/=2;
		}
		return pow;
	}
	static long toggleBits(long x)//one's complement || Toggle bits
	{
		int n=(int)(Math.floor(Math.log(x)/Math.log(2)))+1;

		return ((1<<n)-1)^x;
	}
	static int countBits(long a)
	{
		return (int)(Math.log(a)/Math.log(2)+1);
	}
	static void sort(int[] a) {
		ArrayList<Integer> l=new ArrayList<>();
		for (int i:a) l.add(i);
		Collections.sort(l);
		for (int i=0; i<a.length; i++) a[i]=l.get(i);
	}
	static boolean isPrime(long 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; 
	}
	static long GCD(long a,long b) 
	{
		if(b==0)
		{
			return a;
		}
		else return GCD(b,a%b );
	}

	//Debugging Functions Starts

	static void print(char A[])
	{
		for(char c:A)System.out.print(c+" ");
		System.out.println();
	}
	static void print(boolean A[])
	{
		for(boolean c:A)System.out.print(c+" ");
		System.out.println();
	}
	static void print(int A[])
	{
		for(int a:A)System.out.print(a+" ");
		System.out.println();	
	}
	static void print(long A[])
	{
		for(long i:A)System.out.print(i+ " ");
		System.out.println();

	}
	static void print(ArrayList<Integer> A)
	{
		for(int a:A)System.out.print(a+" ");
		System.out.println();
	}

	//Debugging Functions END
	//----------------------
	//IO FUNCTIONS STARTS
	static HashMap<Integer,Integer> Hash(int A[])
	{
		HashMap<Integer,Integer> mp=new HashMap<>();
		for(int a:A)
		{
			int f=mp.getOrDefault(a,0)+1;
			mp.put(a, f);
		}
		return mp;
	}
	static int i()
	{
		return in.nextInt();
	}

	static long l()
	{
		return in.nextLong();
	}

	static int[] input(int N){
		int A[]=new int[N];
		for(int i=0; i<N; i++)
		{
			A[i]=in.nextInt();
		}
		return A;
	}

	static long[] inputLong(int N)     {
		long A[]=new long[N];
		for(int i=0; i<A.length; i++)A[i]=in.nextLong();
		return A;
	}

	//IO FUNCTIONS END

}
class pair 
{
	int a; long w;
	pair(int a,int index)
	{
		this.a=a;
		this.w=index;
	}

}

//Code For FastReader
//Code For FastReader
//Code For FastReader
//Code For FastReader
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());
	}
	//gey
	double nextDouble()
	{
		return Double.parseDouble(next());
	}

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

}