#include<iostream>
#include<vector>
#include<deque>
#include<algorithm>
#include<map>
#include<array>
#include<utility>
#include<cmath>
#include<queue>
#include<string>
#include<assert.h>

#define MAX64 0x7fffffffffffffff
#define MAX32 0x7fffffff

typedef int_fast64_t ll;
typedef int_fast64_t i64;
typedef int_fast32_t i32;

int main (){
    std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr);
    
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    i32 test_cases;
    std::cin>> test_cases;
    while(test_cases--){
        std::string s;
        std::cin >> s;

        i32 loc_of_a = 0;
        for(i32 i = 0; i < s.size(); i++){
            if(s[i] == 'a') loc_of_a = i;
        }

        char current = 'a'; i32 l = loc_of_a, r = loc_of_a + 1; bool suffice = true;
        while(current <= 'a' + s.size() - 1){
            if(l >= 0 && s[l] == current){
                l -= 1;
                current += 1;
                continue;
            }

            if(r < s.size() && s[r] == current){
                r += 1;
                current += 1;
                continue;
            }

            suffice = false;
            break;
        } 

        if(suffice) std::cout <<"YES\n";
        else std::cout << "NO\n";
    }
}