﻿#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<algorithm>
#include<queue>
#include<cmath>
#include<map>
#include<string>
#include<iomanip>
#include<vector>
using namespace std;
typedef pair<int, int>PII;
typedef long long ll;

int fx[4][2] = { {0,1},{0,-1},{1,0},{-1,0} };
//int fx[8][2] = { {-2,1},{-1,2},{1,2},{2,1},{2,-1},{1,-2},{-1,-2},{-2,-1} };//{ {2, 1}, { 2,-1 }, { 1,2 }, { 1,-2 }, { -2,-1 }, { -2,1 }, { -1,2 }, { -1,-2 } }; //{ { 2, 1},	{ 1, 2},{-1, 2},{-2, 1},{-2,-1},{-1,-2},{ 1,-2},{ 2,-1} };//{ {2,1},{2,-1},{1,2},{1,-2},{-2,-1},{-2,1},{-1,2},{-1,-2} };
const int mod = 199999;
const int M = 200500;
const int inf = 1e9 + 7;

int mapp[27];
int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int fff = 0;
		memset(mapp, 0, sizeof mapp);
		string s,f="";
		int flag=0;
		cin >> s;
		for (int i = 0; i < s.size(); i++)
		{
			mapp[s[i] - 'a']++;
			if (mapp[s[i] - 'a'] > 1)fff = 1;
		}
		if (fff)
		{
			cout << "NO\n";
			continue;
		}
		for (int i = 0, j = s.size()-1; i < j;)
		{
			if (s[i] > s[j])f = f + s[i++];
			else if(s[i]<s[j]) f = f + s[j--];
			flag = i;
		}
		f = f + s[flag];
		//cout << s << endl;
		//cout << f << endl;
		if (s.size() != f.size())cout << "NO\n";
		else
		{
			int ff = 0;
			for (int i = 0; i < f.size()-1; i++)
			{
				if (f[i] - f[i + 1] > 1)ff = 1;
			}
			if (ff||f[f.size()-1]!='a')cout << "NO\n";
			else cout << "YES\n";
		}


	}

}

