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.
///STOP DOING SILLY MISTAKES
#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp> // Common file 
//#include <ext/pb_ds/tree_policy.hpp> 
#define int long long
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define ii insert
#define ld long double
#define sz(x) (int)x.size()
#define all(v) v.begin(),v.end()
#define ppb pop_back
#define nuenxfiu ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define input freopen("input.txt", "r", stdin),freopen("output.txt", "w", stdout);
#define TT int testcases;cin>>testcases;while(testcases--)
#define mk make_pair
#define MAX ((int)3e5+5)
#define mod ((int)1e9+7)
#define MOD 1000003
#define N ((int)4e6+5)
#define ll long long
int expo(int x,int y){ int res=1; while(y) {if(y%2) res=(res*x%mod)%mod; x=(x*x)%mod; y/=2; } return res;}
int sub(int a, int b) {return (a%mod - b%mod + mod)%mod;}
int mul(int a, int b) {return ((a%mod)*(b%mod) + mod)%mod;}
int inv(int x) {return expo(x, mod-2);}
int fact(int n) {int res = 1;for (int i = 1; i <= n; i++) {res = res * 1ll * i % mod;}return res;}
int fpow(int a, int p) {int res = 1;while (p) {if (p % 2 == 0) {a = a * 1ll * a % mod;p /= 2;} else {res = res * 1ll * a % mod;p--;}}return res;}
int nCr(int n, int k) {return fact(n) * 1ll * fpow(fact(k), mod - 2) % mod * 1ll * fpow(fact(n - k), mod - 2) % mod;}
#define endl "\n"
using namespace std;
// int ans;
// vector<vector<int>>v;
// vector<int>dp,dp1;

bool cmp(vector<int>& a, vector<int>& b){
   return a[1]<b[1];
}

void solve()
{
	string s;
	cin>>s;
	set<char>st;
//	sort(s.begin(),s.end());
	for(int i=0;i<s.size();i++)
	st.insert(s[i]);
	int n=s.size();
	if(st.size()==s.size())
	{
		int cnt=0;
		for(int i=1;i<n-1;i++)
		{
			if(s[i]>=s[i+1] && s[i]>=s[i-1]){
				cnt=1;
				cout<<"NO"<<endl;
				break;
			}
		}
		sort(s.begin(),s.end());
		if(cnt!=1 && s[0]=='a' && s[n-1]==(char)('a'+n-1))
		cout<<"YES"<<endl;
		else if(cnt!=1 && (s[0]!='a' || s[n-1]!=(char)('a'+n-1)))
		cout<<"NO"<<endl;
	}
	else
	cout<<"NO"<<endl;
}

signed main()
{
    
   nuenxfiu
   int t;
   cin>>t;
   while(t--)
   {
     solve();
   }

   return 0;
}




