A string is called diverse if it contains consecutive (adjacent) letters of the Latin alphabet and each letter occurs exactly once. For example, the following strings are diverse: "fced", "xyz", "r" and "dabcef". The following string are not diverse: "az", "aa", "bad" and "babc". Note that the letters 'a' and 'z' are not adjacent.

Formally, consider positions of all letters in the string in the alphabet. These positions should form contiguous segment, i.e. they should come one by one without any gaps. And all letters in the string should be distinct (duplicates are not allowed).

You are given a sequence of strings. For each string, if it is diverse, print "Yes". Otherwise, print "No".


-----Input-----

The first line contains integer $n$ ($1 \le n \le 100$), denoting the number of strings to process. The following $n$ lines contains strings, one string per line. Each string contains only lowercase Latin letters, its length is between $1$ and $100$, inclusive.


-----Output-----

Print $n$ lines, one line per a string in the input. The line should contain "Yes" if the corresponding string is diverse and "No" if the corresponding string is not diverse. You can print each letter in any case (upper or lower). For example, "YeS", "no" and "yES" are all acceptable.


-----Example-----
Input
8
fced
xyz
r
dabcef
az
aa
bad
babc

Output
Yes
Yes
Yes
Yes
No
No
No
No

Source: codeforces | Difficulty: EASY
Tags: String algorithms

Implementation


Solutions:
t = int(input())
while t:
	s = input()
	s = sorted(list(s))
	flag = 0
	for i in range(len(s) - 1):
		if s.count(s[i]) > 1:
			flag = 1
			break
		if chr(ord(s[i]) + 1) not in s:
			flag = 1
			break
	if flag == 0 or len(s) == 1:
		print('Yes')
	else:
		print('No')
	t = t - 1


def solution(st):
	if len(st) < 2:
		return True
	for i in range(1, len(st)):
		if ord(st[i]) - ord(st[i - 1]) != 1:
			return False
	return True
for _ in range(int(input())):
	st = list(input())
	st.sort()
	if solution(st):
		print('YES')
	else:
		print('NO')


n = int(input())
strings = []
for k in range(0, n):
	strings.append(input())
for j in strings:
	flag = 0
	if len(j) != 1:
		teste = []
		[teste.append(x) for x in j]
		if len(teste) == len(set(teste)):
			ordem = [ord(y) for y in teste]
			ordem.sort()
			for g in range(1, len(ordem)):
				if ordem[g - 1] - ordem[g] != -1:
					flag = 2
					break
			if flag == 0:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
	else:
		print('Yes')


def diverse(s):
	if len(s) == 1 or len(s) == 0:
		return True
	s = [c for c in s]
	s.sort()
	if not all((abs(ord(s[i]) - ord(s[i + 1])) == 1 for i in range(len(s) - 1))):
		return False
	return True
for _ in range(int(input())):
	if diverse(input()):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	s = sorted(input())
	if len(set((*s,))) == len(s) and ord(s[-1]) - ord(s[0]) + 1 == len(s):
		print('Yes')
	else:
		print('No')


tst = int(input())
for i in range(0, tst):
	s = input()
	all = [0] * 26
	ok = True
	for c in s:
		all[ord(c) - ord('a')] += 1
	le = 0
	r = 25
	for j in range(0, 26):
		if all[j] > 1:
			ok = False
		if all[j]:
			le = max(le, j)
			r = min(r, j)
	ll = le
	le = r
	r = ll
	for j in range(0, 26):
		if j >= le and j <= r:
			ok &= all[j] > 0
		else:
			ok &= all[j] == 0
	if ok:
		print('Yes')
	else:
		print('No')


n = int(input())
while n:
	n -= 1
	s = input()
	s = sorted(s)
	flag = False
	for i in range(len(s) - 1):
		if ord(s[i]) + 1 != ord(s[i + 1]):
			flag = True
			break
	if flag:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	s = list(input())
	s.sort()
	res = True
	i = 0
	for x in s[1:]:
		res &= ord(x) - ord(s[i]) == 1
		i += 1
	print('YNeos'[not res::2])


import sys
import string

def checkDup(seq):
	return len(seq) == len(set(seq))

def checkConsecutive(l):
	return sorted(l) == list(range(min(l), max(l) + 1))

def main():
	for _ in range(int(input())):
		s = input()
		diverse = [string.ascii_lowercase.index(i) for i in s]
		if not checkDup(s):
			print('NO')
		elif checkConsecutive(diverse):
			print('YES')
		else:
			print('NO')
main()


for _ in range(int(input())):
	s = input()
	if len(s) == 1:
		print('Yes')
		continue
	f = 0
	s = ''.join(sorted(s))
	num = ord(s[0])
	for i in range(len(s)):
		if ord(s[i]) != num:
			f = 1
			break
		num += 1
	if f:
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	s = [i for i in input()]
	d = [ord(i) for i in s]
	c = 0
	for i in range(len(d)):
		if d.count(d[i]) > 1:
			c += 1
	if max(d) - min(d) == len(s) - 1 and c == 0:
		print('YES')
	else:
		print('NO')


def diverse(s):
	if len(set(s)) != len(s):
		return 'NO'
	start = ord(min(s))
	for i in range(start, start + len(s)):
		tmp = chr(i)
		if tmp not in s:
			return 'NO'
	return 'YES'
n = int(input())
for i in range(n):
	s = input()
	print(diverse(s))


n = int(input())
check = True
a = []
for i in range(n):
	s = input()
	a.append(list(s))
for i in range(len(a)):
	a[i].sort()
	check = True
	if len(a[i]) != 1:
		for j in range(len(a[i]) - 1):
			if ord(a[i][j]) + 1 != ord(a[i][j + 1]):
				check = False
	if check == False:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	string = input()
	cnt = [0] * 26
	once = True
	smallest = float('inf')
	largest = float('-inf')
	for i in range(0, len(string)):
		idx = ord(string[i]) - ord('a')
		cnt[idx] += 1
		if cnt[idx] > 1:
			once = False
		smallest = min(smallest, idx)
		largest = max(largest, idx)
	if not once:
		print('NO')
	else:
		consecutive = True
		for i in range(smallest, largest + 1):
			if cnt[i] == 0:
				consecutive = False
				break
		if consecutive:
			print('YES')
		else:
			print('NO')


s = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(int(input())):
	a = list(input())
	a.sort()
	a = ''.join(a)
	if a in s:
		print('YES')
	else:
		print('NO')


t = int(input())
for z in range(t):
	s = input()
	s = list(s)
	l = len(s)
	a = 'Yes'
	for i in range(l):
		for j in range(l):
			if s[j] > s[i]:
				temp = s[i]
				s[i] = s[j]
				s[j] = temp
	for i in range(l - 1):
		d = ord(s[i + 1]) - ord(s[i])
		if d != 1:
			a = 'No'
			break
	print(a)


class CodeforcesTask1144ASolution:

	def __init__(self):
		self.result = ''
		self.query_count = 0
		self.queries = []

	def read_input(self):
		self.query_count = int(input())
		for x in range(self.query_count):
			self.queries.append(input())

	def process_task(self):
		letters = 'abcdefghijklmnopqrstuvwxyz'
		for query in self.queries:
			occs = {c: query.count(c) for c in letters}
			result = True
			started = False
			stopped = False
			for key in occs:
				if occs[key]:
					if occs[key] > 1:
						result = False
						break
					elif not started:
						started = True
					elif stopped:
						result = False
						break
				elif started:
					stopped = True
			self.result += 'Yes\n' if result else 'No\n'

	def get_result(self):
		return self.result
Solution = CodeforcesTask1144ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


N = int(input())
for i in range(N):
	s = list(input())
	s = sorted(s)
	isd = True
	for i in range(len(s) - 1):
		if ord(s[i]) + 1 != ord(s[i + 1]):
			isd = False
			break
	if isd:
		print('Yes')
	else:
		print('No')


n = int(input())
for _ in range(n):
	a = input()
	ans = [0] * 26
	for i in a:
		check = ord(i) - ord('a')
		ans[check] += 1
	flag = 0
	for i in range(26):
		if ans[i] > 1:
			flag = 1
			break
		if ans[i] == 1:
			j = i + 1
			for j in range(i + 1, 26):
				if ans[j] > 1:
					flag = 1
					break
				if ans[j] != 1:
					break
			for k in range(j + 1, 26):
				if ans[k] != 0:
					flag = 1
					break
			if flag == 1:
				break
			else:
				break
	if flag == 1:
		print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	a = input()
	b = list(a)
	b.sort()
	c = ''
	for i in b:
		c += i
	if c in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	max1 = ord('a')
	min1 = ord('z')
	seen = [0 for j in range(26)]
	for j in s:
		t = ord(j)
		if seen[t - 97] == 1:
			print('No')
			break
		seen[t - 97] = 1
		if t > max1:
			max1 = t
		if t < min1:
			min1 = t
	else:
		if max1 - min1 + 1 == len(s):
			print('Yes')
		else:
			print('No')


alph = '-abcdefghijklmnopqrstuvwxyz-'
n = int(input())
for i in range(n):
	s = list(str(input()))
	if len(s) == 1:
		print('Yes')
		continue
	left = 999
	right = 0
	if len(list(set(s))) == len(s):
		for j in range(len(s)):
			k = alph.index(s[j])
			left = min(left, k)
			right = max(right, k)
		if right - left + 1 == len(s):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = int(input())
for i in range(0, n):
	s = input()
	x = [0] * len(s)
	for j in range(0, len(s)):
		x[j] = ord(s[j])
	x.sort()
	c = True
	last = x[0]
	for j in range(1, len(s)):
		if abs(x[j] - last) != 1:
			c = False
			break
		last = x[j]
	if c:
		print('Yes')
	else:
		print('No')


import math

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = list(map(int, input().split()))
	return (n, m)

def dva():
	(n, m) = list(map(int, input().split()))
	b = [int(x) for x in input().split()]
	return (n, m, b)

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)
n = int(input())
for i in range(n):
	s = input()
	if len(s) == 1:
		print('Yes')
		continue
	if len(set(s)) < len(s):
		print('No')
		continue
	s = sorted(set(s))
	f = True
	for i in range(len(s) - 1):
		d = ord(s[i])
		d1 = ord(s[i + 1])
		if d1 - d != 1:
			print('No')
			f = False
			break
	if f:
		print('Yes')


n = int(input())
for _ in range(n):
	s = input()
	kek = True
	a = sorted(list(s))
	for i in range(1, len(a)):
		if abs(ord(a[i]) - ord(a[i - 1])) != 1:
			kek = False
			break
	if kek:
		print('YES')
	else:
		print('NO')


n = int(input())
array = []
for i in range(n):
	array.append(input())
for x in range(n):
	res = []
	temp = array[x]
	equal = 0
	for y in range(len(temp)):
		res.append(ord(temp[y]))
	maxv = max(res)
	minv = min(res)
	for q in range(len(res)):
		for z in range(len(res)):
			if res[z] == res[q] and q != z:
				equal += 1
	if maxv - minv + 1 == len(res) and equal == 0:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	string = sorted(input())
	string = ''.join(string)
	alpha = 'abcdefghijklmnopqrstuvwxyz'
	if string in alpha:
		print('YES')
	else:
		print('NO')


def get_distribution(s):
	d = [0] * 26
	ch_a = ord('a')
	for c in s:
		d[ord(c) - ch_a] += 1
	return d

def is_shuffled(s):
	d = get_distribution(s)
	repeating = [idx for (idx, val) in enumerate(d) if val > 1]
	if len(repeating):
		return 'No'
	a = [idx for (idx, val) in enumerate(d) if val == 1]
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] != 1:
			return 'No'
	return 'Yes'
n = int(input())
for i in range(n):
	string = str(input())
	print(is_shuffled(string))


import sys
input = sys.stdin.readline
tc = int(input())
for _ in range(tc):
	n = input().rstrip()
	ans = True
	mini = ord(min(n))
	checker = min(n)
	for _ in range(len(n) - 1):
		checker += chr(mini + 1)
		mini += 1
	for ch in n:
		if 1 < n.count(ch) or ch not in checker:
			ans = False
			break
	if ans:
		print('YES')
	else:
		print('NO')


test_cases = int(input())
alpha = 'abcdefghijklmnopqrstuvwxyz'
for i in range(test_cases):
	s = input()
	arranged_s = ''.join(sorted(s))
	if arranged_s in alpha:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(0, n):
	mini = 10000
	maxi = 0
	s = str(input())
	l = list(s)
	if len(l) != len(set(l)):
		print('no')
		continue
	else:
		for j in s:
			if mini > ord(j):
				mini = ord(j)
			if maxi < ord(j):
				maxi = ord(j)
	if maxi - mini + 1 == len(s):
		print('yes')
	else:
		print('no')


while True:
	try:
		n = int(input())
		while n > 0:
			ch = input()
			ch = ''.join((lambda x: (x.sort(), x)[1])(list(ch)))
			l = len(ch)
			p = 0
			for i in range(1, l):
				if ch[i] != chr(ord(ch[i - 1]) + 1):
					p = 1
					break
			if p:
				print('No')
			else:
				print('Yes')
			n -= 1
	except:
		break


check = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for i in range(int(input())):
	s = input()
	a = ''.join(set(s))
	if len(a) != len(s):
		print('No')
	else:
		a = list(a)
		a.sort()
		temp = a[0]
		flag = check.index(temp)
		count = 0
		for j in range(len(a)):
			if a[j] == check[flag]:
				count += 1
				flag += 1
			else:
				break
		if count == len(a):
			print('Yes')
		else:
			print('No')


for i in range(int(input())):
	s = list(input())
	s.sort()
	ans = 'Yes'
	for i in range(1, len(s)):
		if ord(s[i]) != ord(s[i - 1]) + 1:
			ans = 'No'
			break
	print(ans)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	a = [S() for _ in range(n)]
	r = []
	for s in a:
		s = ''.join(sorted([c for c in s]))
		if s in string.ascii_lowercase:
			r.append('Yes')
		else:
			r.append('No')
	return '\n'.join(r)
print(main())


n = int(input())
a = ''.join([chr(i) for i in range(ord('a'), ord('z') + 1)])
for i in range(n):
	s = ''.join(list(sorted(list(map(str, input())))))
	if s in a:
		print('Yes')
	else:
		print('No')


n = int(input())
lst = [''] * n
for i in range(n):
	lst[i] = input()

def f(x):
	l2 = [0] * len(x)
	for i in range(len(x)):
		l2[i] = ord(x[i]) - 96
	l2.sort()
	q = 0
	for i in range(len(x) - 1):
		if l2[i] == l2[i + 1] - 1:
			q += 1
		else:
			print('No')
			break
	if q == len(x) - 1:
		print('Yes')
for i in range(n):
	f(lst[i])


from sys import stdin, stdout

def isDiverse(s):
	setList = list(sorted(set(s)))
	if len(setList) == len(s):
		maxVal = ord(setList[-1])
		minVal = ord(setList[0])
		diff = abs(maxVal - minVal) + 1
		if diff == len(s):
			print('Yes')
		else:
			print('No')
	else:
		print('No')
num = int(input())
for x in range(0, num):
	isDiverse(input())


import string
l = list(string.ascii_lowercase)
n = int(input())
for _ in range(n):
	s = input()
	s = sorted(s)
	ind = l.index(s[0])
	tt = ind + len(s)
	new = l[ind:tt]
	flag = True
	for i in range(len(s) - 1):
		if abs(ord(s[i]) - ord(s[i + 1])) == 1:
			pass
		else:
			flag = False
			break
	if flag:
		print('yes')
	else:
		print('no')


n = int(input())
A = list('abcdefghijklmnopqrstuvwxyz')
for _ in range(n):
	l = list(input())
	l.sort()
	se = list(set(l))
	if len(se) < len(l):
		print('NO')
	else:
		indx = A.index(l[0])
		le = len(l)
		lp = A[indx:indx + le]
		if lp == l:
			print('YES')
		else:
			print('NO')


n = int(input())
for i in range(n):
	st = input()
	li = []
	for c in st:
		li.append(c)
	li.sort()
	f = 1
	for i in range(1, len(li)):
		if ord(li[i]) - ord(li[i - 1]) > 1 or ord(li[i]) - ord(li[i - 1]) == 0:
			f = 0
	if f == 1:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	In = input()
	S = list(set(In))
	S.sort()
	if ord(S[len(S) - 1]) - ord(S[0]) == len(S) - 1 and len(In) == len(S):
		print('YES')
	else:
		print('NO')


n = int(input())
r = [None] * n
for i in range(0, n):
	l = list(input())
	l.sort()
	con = True
	for j in range(0, len(l) - 1):
		if chr(ord(l[j]) + 1) == l[j + 1]:
			continue
		con = False
		break
	if con:
		r[i] = 1
	else:
		r[i] = 0
for i in range(0, n):
	if r[i] == 1:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	a = input()
	b = sorted(a)
	f = 0
	for j in range(1, len(a)):
		if ord(b[j - 1]) + 1 == ord(b[j]):
			f = 0
		else:
			f = 1
			break
	if f == 1:
		print('No')
	else:
		print('Yes')


n = int(input())
inps = []
for i in range(n):
	inp_str = input()
	inps.append(inp_str)

def diverse_string(string):
	alpha_str = ''.join(sorted(list(string)))
	for i in range(len(alpha_str) - 1):
		if alpha_str[i] == alpha_str[i + 1] or ord(alpha_str[i + 1]) - ord(alpha_str[i]) > 1:
			return 'No'
	return 'Yes'
for inp in inps:
	res = diverse_string(inp)
	print(res)


l = int(input())
for i in range(l):
	e = 0
	a = input()
	s = list(a)
	s.sort()
	if len(s) == 1:
		print('Yes')
	else:
		for ii in range(len(s) - 1):
			if ord(s[ii]) + 1 != ord(s[ii + 1]):
				print('No')
				e = 1
				break
		if e != 1:
			print('Yes')


for i in range(int(input())):
	s = list(input())
	s.sort()
	flag = 0
	for i in range(len(s) - 1):
		if ord(s[i + 1]) - ord(s[i]) != 1:
			flag = 1
			break
	if flag == 0 and len(set(s)) == len(s):
		print('Yes')
	else:
		print('No')


import sys
from bisect import bisect_left, bisect_right
from collections import deque, Counter
from math import gcd, sqrt, factorial, ceil, log
from itertools import permutations
inf = float('inf')
mod = 1000000007
mini = 1000000007

def fact(n):
	if n == 0:
		return 1
	p = 1
	d = 10 ** 9 + 7
	for i in range(1, n + 1):
		p = p * i
		p = p % d
	return p

def ncr(n, r):
	d = 10 ** 9 + 7
	num = fact(n)
	den = fact(r) * fact(n - r) % d
	den = pow(den, d - 2, d)
	return num * den % d

def sieve(n):
	prime = [True for i in range(n + 1)]
	lst = []
	p = 2
	while p * p <= n:
		if prime[p]:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p = p + 1
	for i in range(2, n + 1):
		if prime[i]:
			lst.append(i)
	return len(lst)

def binary(number):
	result = 0
	while number:
		result = result + 1
		number = number & number - 1
	return result

def calculate_factors(n):
	hh = [1] * (n + 1)
	p = 2
	while p * p < n:
		if hh[p] == 1:
			for i in range(p * 2, n, p):
				hh[i] = 0
		p += 1
	total = 1
	for p in range(2, n + 1):
		if hh[p] == 1:
			count = 0
			if n % p == 0:
				while n % p == 0:
					n = int(n / p)
					count += 1
				total *= count + 1
	return total

def prime_factors(n):
	i = 2
	factors = set()
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.add(i)
	if n > 1:
		factors.add(n)
	if len(factors) == 2:
		return True
	else:
		return False

def isPrime(n):
	if n == 2 or n == 3:
		return True
	if n % 2 == 0 or n < 2:
		return False
	for i in range(3, int(n ** 0.5) + 1, 2):
		if n % i == 0:
			return False
	return True

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
T = int(input())
mylist = []
mydic = dict()
j = 0
for i in range(97, 123):
	mydic[chr(i)] = j
	j = j + 1
for i in range(97, 123):
	mylist.append(chr(i))
while T > 0:
	string = list(input())
	string.sort()
	mydict = dict()
	for i in string:
		mydict[i] = mydict.get(i, 0) + 1
	flag = 0
	for i in mydict:
		if mydict[i] >= 2:
			flag = 1
			break
	if flag == 1:
		print('No')
	else:
		index = mydic[string[0]]
		flag = 0
		k = 0
		for i in range(index, len(string) + index):
			if string[k] != mylist[i]:
				flag = 1
				break
			else:
				k = k + 1
		if flag == 1:
			print('No')
		else:
			print('Yes')
	T = T - 1


n = int(input())
for i in range(n):
	x = input()
	x = sorted(x)
	ans = 'Yes'
	for j in range(len(x) - 1):
		if ord(x[j + 1]) - ord(x[j]) != 1:
			ans = 'No'
			break
	print(ans)


n = int(input())
for i in range(n):
	s = input()
	flag = True
	comecou = terminou = False
	l = [0 for i in range(26)]
	for c in s:
		l[ord(c) - 97] += 1
	for i in range(26):
		if l[i] > 1:
			flag = False
		elif not comecou and l[i] == 1:
			comecou = True
		elif not terminou and comecou and (l[i] == 0):
			terminou = True
		elif terminou and l[i] == 1:
			flag = False
	if flag:
		print('Yes')
	else:
		print('No')


n = int(input())
for _ in range(n):
	alp = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
	c = [0] * 26
	s = input()
	if len(s) > 26:
		print('No')
		continue
	fl = False
	for x in s:
		j = alp.index(x)
		c[j] += 1
		if c[j] > 1:
			print('No')
			fl = True
			break
	if fl:
		continue
	flb = False
	fle = False
	ans = True
	for i in range(26):
		if c[i] == 1:
			if fle:
				ans = False
			if not flb:
				flb = True
		elif flb:
			fle = True
	if ans:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	a = input()
	l = []
	for i in a:
		l += [i]
	if len(a) == 1:
		print('YES')
	elif len(l) == len(set(l)):
		l.sort()
		for i in range(ord(l[0]), ord(l[-1]) + 1):
			if chr(i) in l:
				pass
			else:
				print('NO')
				break
		else:
			print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	s = input()
	if ''.join(sorted(s)) in 'abcdefghijklmnopqrstuvwxyz':
		print('YES')
	else:
		print('NO')


n = int(input())

def isDiverse(s):
	l = {}
	min = 99999999
	max = 0
	for i in s:
		if i in l:
			return False
		else:
			l[i] = True
		if ord(i) < min:
			min = ord(i)
		if ord(i) > max:
			max = ord(i)
	return max - min + 1 == len(s)
for i in range(n):
	if isDiverse(input()):
		print('Yes')
	else:
		print('No')


q = int(input())

def test(s):
	c = [0 for i in range(0, 26)]
	for i in range(len(s)):
		c[ord(s[i]) - ord('a')] += 1
	min_c = 100
	max_c = -1
	for i in range(26):
		if c[i] >= 2:
			return False
		if c[i] == 1:
			if i < min_c:
				min_c = i
			if i > max_c:
				max_c = i
	if max_c - min_c != len(s) - 1:
		return False
	return True
for iteration in range(0, q):
	s = input()
	if test(s):
		print('Yes')
	else:
		print('No')


def isdiverse(string):
	l = list(map(ord, list(string)))
	l.sort()
	checker = True
	for i in range(len(l) - 1):
		if l[i + 1] != l[i] + 1:
			checker = False
	if checker == True:
		return 'Yes'
	else:
		return 'No'
t = int(input())
for i in range(t):
	print(isdiverse(input()))


n = int(input())
for i in range(0, n):
	s = input().rstrip()
	x = list(s)
	x.sort(key=str)
	U = 0
	G = 0
	for j in range(0, len(x) - 1):
		if x.count(x[j]) == 1 and ord(x[j]) + 1 == ord(x[j + 1]):
			G += 1
		else:
			U = 1
			break
	if U == 0:
		print('Yes')
	else:
		print('No')


n = int(input())
otv = []
alf = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	a = input()
	l = len(a)
	if l > 26:
		otv.append('No')
	else:
		dob = 0
		for j in range(28 - l):
			mn = set(alf[j:j + l])
			if set(a) == mn:
				otv.append('Yes')
				dob = 1
		if dob == 0:
			otv.append('No')
for elem in otv:
	print(elem)


t = int(input())
for r in range(t):
	strings = str(input())
	string = []
	count = 1
	if len(string) > 26:
		print('No')
	else:
		for x in strings:
			string.append(x)
		string.sort()
		for leng in range(len(string) - 1):
			if ord(string[leng + 1]) == ord(string[leng]) + 1:
				count = count + 1
		if count == len(string):
			print('Yes')
		else:
			print('No')


for t in range(int(input())):
	d = {}
	s = input()
	m = sorted(list(s))
	if len(s) == 1:
		print('Yes')
		continue
	flag = False
	for i in d:
		try:
			d[i] += 1
		except:
			d[i] = 1
	for (i, j) in d.items():
		if j >= 2:
			print('No')
			flag = True
			break
	if flag:
		continue
	for i in range(1, len(s)):
		if ord(m[i]) != ord(m[i - 1]) + 1:
			print('No')
			flag = True
			break
	if not flag:
		print('Yes')


import math
import sys

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))
n = ii()
for j in range(n):
	t = sorted(input())
	print('No') if any((ord(t[i]) != ord(t[i + 1]) - 1 for i in range(len(t) - 1))) else print('Yes')


n = int(input())
for i in range(n):
	s = input()
	alph = 'abcdefghijklmnopqrstuvwxyz'
	if len(set(s)) != len(s):
		print('NO')
	elif len(s) == 1:
		print('YES')
	else:
		s = list(s)
		s = sorted(s)
		s = ''.join(s)
		if s in alph:
			print('YES')
		else:
			print('NO')


t = int(input())
for j in range(t):
	s = input()
	i = 0
	flag = True
	a = ''
	while i < len(s) and flag:
		if s[i] not in a:
			a = a + s[i]
		else:
			flag = False
		i = i + 1
	if flag == False:
		print('NO')
	else:
		s = sorted(s)
		d = 0
		for i in range(len(s) - 1):
			d = d + abs(ord(s[i]) - ord(s[i + 1]))
		if d == len(s) - 1:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	s = list(input())
	s.sort()
	l = len(s)
	p = ord(s[0])
	k = 1
	for i in range(1, l):
		if ord(s[i]) != p + i:
			k = 0
			break
	if k == 1:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	s = sorted(s)
	res = 1
	for j in range(len(s) - 1):
		if ord(s[j + 1]) - ord(s[j]) != 1:
			res = 0
	if res == 0:
		print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	s = input()
	if len(s) == len(set(s)) and abs(ord(min(s)) - ord(max(s))) == len(s) - 1:
		print('Yes')
	else:
		print('No')


n = int(input())
a = 'abcdefghijklmnopqrstuvwxyz'
ans = []
for i in range(n):
	s = list(input())
	if len(set(s)) == len(s):
		s.sort()
		s = ''.join(s)
		if s in a:
			ans.append('Yes')
		else:
			ans.append('No')
	else:
		ans.append('No')
for i in range(len(ans)):
	print(ans[i])


cases = int(input())
while cases > 0:
	str = input()
	strSorted = sorted(str)
	isDiverse = True
	for i in range(0, len(strSorted) - 1):
		if ord(strSorted[i + 1]) - ord(strSorted[i]) != 1:
			isDiverse = False
			break
	if isDiverse:
		print('Yes')
	else:
		print('No')
	cases = cases - 1


n = int(input())

def check(str):
	if len(str) > 26:
		return False
	arr = sorted(list(str))
	h = {arr[0]: True}
	for i in range(1, len(arr)):
		if h.get(arr[i]) or arr[i] != chr(ord(arr[i - 1]) + 1):
			return False
		h[arr[i]] = True
	return True
T = [input() for _ in range(n)]
for t in T:
	print('Yes' if check(t) else 'No')


n = int(input())
strs = [list(input()) for i in range(n)]
alth = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	strs[i].sort()
	ans = True
	for j in range(1, len(strs[i])):
		if strs[i][j] == strs[i][j - 1] or abs(alth.find(strs[i][j]) - alth.find(strs[i][j - 1])) > 1:
			ans = False
			break
	if ans:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	strr = input()
	strrsort = ''.join(sorted(strr))
	lenn = len(set(strr))
	lenns = len(strr)
	flag = 0
	if lenn != lenns:
		print('no')
		flag = 1
	if flag == 0:
		if abs(ord(strrsort[-1]) - ord(strrsort[0])) == lenns - 1:
			print('yes')
		else:
			print('no')


n = int(input())
for q in range(n):
	a = sorted(list(input()))
	if len(set(a)) != len(a):
		print('No')
	else:
		for q1 in range(len(a) - 1):
			if ord(a[q1]) + 1 != ord(a[q1 + 1]):
				print('No')
				break
		else:
			print('Yes')


n = int(input())
for _ in range(n):
	a = input()
	a = sorted(a)
	gonext = False
	for i in range(1, len(a)):
		if ord(a[i]) - ord(a[i - 1]) != 1:
			print('No')
			gonext = True
			break
	if gonext:
		continue
	print('Yes')


n = int(input())
for i in range(n):
	flag = 0
	a = input()
	b = list(map(ord, a))
	b.sort()
	for j in range(len(b) - 1):
		if b[j] + 1 == b[j + 1]:
			continue
		else:
			flag = 1
			break
	if flag == 0:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	s = input()
	s = ''.join(sorted(s))
	st = set(s)
	ok = 1
	if len(st) == len(s):
		for c in range(len(s) - 1):
			if ord(s[c]) + 1 != ord(s[c + 1]):
				ok = 0
	else:
		ok = 0
	if ok == 1:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	x = []
	for le in s:
		x.append(ord(le))
		x = sorted(x)
	c = 0
	for i in range(1, len(x)):
		if x[i] == x[i - 1]:
			print('No')
			c = 1
			break
	if c == 0:
		if abs(x[0] - x[len(x) - 1]) == len(x) - 1:
			print('Yes')
		else:
			print('No')


x = int(input())

def f(x):
	s = [ord(n) for n in x]
	s.sort()
	l = 0
	for n in s:
		if s.count(n) == 1:
			l = 1
		else:
			l = 0
			break
	if l == 1:
		for n in range(len(s) - 1):
			if s[n + 1] - s[n] == 1:
				l = 1
			else:
				l = 0
				break
	if l == 0:
		print('No')
	else:
		print('Yes')
for n in range(x):
	f(input())


n = int(input())
a = []
for i in range(0, n):
	a.append(input())
for i in a:
	l = len(i)
	m = min(i)
	j = 0
	for k in range(0, l):
		if chr(ord(m) + k) not in i:
			j = 1
			break
	if j == 1:
		print('No')
	else:
		print('Yes')


t = int(input())
while t != 0:
	s = input()
	li = list(s)
	set1 = set(s)
	if len(set1) != len(s):
		print('No')
	else:
		li.sort()
		count = 0
		for i in range(len(li) - 1):
			ele1 = ord(li[i])
			ele2 = ord(li[i + 1])
			if abs(ele1 - ele2) == 1:
				count += 1
		if count == len(li) - 1:
			print('Yes')
		else:
			print('No')
	t = t - 1


for i in range(int(input())):
	s = input()
	a = list()
	for j in range(len(s)):
		a.append(s[j])
	a.sort()
	b = True
	for j in range(len(a) - 1):
		if ord(a[j + 1]) != ord(a[j]) + 1:
			b = False
			break
	if b:
		print('Yes')
	else:
		print('No')


def is_var(s):
	if len(s) > 26:
		return 0
	a = [0] * 26
	b = [0] * 26
	x = 'a'
	set1 = set([])
	count = 0
	for i in range(0, 26):
		l = s.count(x)
		if l > 1:
			return 0
		if l > 0:
			set1.add(i)
			count += 1
		x = chr(ord(x) + 1)
	if max(set1) - min(set1) == count - 1:
		return 1
	else:
		return 0
n = int(input())
for i in range(n):
	s = input()
	if is_var(s):
		print('YES')
	else:
		print('NO')


n = int(input())
for _ in range(n):
	s = input()
	if len(set(s)) == len(s) and ''.join(sorted(s)) in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	a = input()
	hasil = 'No'
	array = []
	for j in a:
		array += [ord(j)]
	array = sorted(array)
	for k in range(len(array)):
		if k != len(array) - 1 and array[k + 1] - array[k] == 1:
			hasil = 'Yes'
		elif k != len(array) - 1 and array[k + 1] - array[k] != 1:
			hasil = 'No'
			break
		elif len(array) == 1:
			hasil = 'Yes'
	print(hasil)


def fun():
	f = True
	st = input()
	st = ''.join(sorted(st))
	for i in range(1, len(st)):
		now = st[i]
		prev = chr(ord(st[i - 1]) + 1)
		if now != prev:
			print('NO')
			f = False
			break
	if f:
		print('YES')
t = int(input())
while t > 0:
	fun()
	t = t - 1


n = int(input())
l = []
for i in range(n):
	a = str(input())
	b = set(list(a))
	c = sorted(list(a), key=lambda i: ord(i))
	if len(a) == len(b) and ord(c[-1]) - ord(c[0]) == len(a) - 1:
		l.append('Yes')
	else:
		l.append('No')
for i in l:
	print(i)


import os
import heapq
import sys, threading
import math
import bisect
import operator
from collections import defaultdict
sys.setrecursionlimit(10 ** 5)
from io import BytesIO, IOBase

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def power(x, p, m):
	res = 1
	while p:
		if p & 1:
			res = res * x % m
		x = x * x % m
		p >>= 1
	return res

def inar():
	return [int(k) for k in input().split()]

def lcm(num1, num2):
	return num1 * num2 // gcd(num1, num2)

def main():
	t = int(input())
	for _ in range(t):
		arr = input()
		tup = []
		for i in range(len(arr)):
			tup.append(ord(arr[i]))
		tup.sort()
		counter = 0
		for i in range(1, len(arr)):
			if tup[i] - tup[i - 1] == 1:
				continue
			else:
				counter = 1
				break
		if counter:
			print('NO')
		else:
			print('YES')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def isDif(s):
	a = [0] * 26
	for i in s:
		o = ord(i) - ord('a')
		a[o] += 1
		if a[o] > 1:
			return False
	a_s = ''.join(list(map(str, a)))
	return a_s.rfind('1') - a_s.find('1') + 1 == sum(a)
n = int(input())
ans = []
for i in range(n):
	if isDif(input()):
		ans.append('yes')
	else:
		ans.append('no')
print('\n'.join(ans))


n = int(input())
all = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	string = str(input())
	new = ''.join(sorted(string))
	if new in all:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = str(input())
	s = list(s)
	if len(s) == 1:
		print('Yes')
		continue
	s.sort()
	t = [ord(s_) for s_ in s]
	diffs = [j - i for (i, j) in zip(t[:-1], t[1:])]
	if list(set(diffs))[0] == 1 and len(set(diffs)) == 1:
		print('Yes')
	else:
		print('No')


def diverse(st):
	s = sorted(set(st))
	if s != sorted(st):
		return False
	count = 0
	for i in range(0, len(s) - 1):
		if ord(s[i]) + 1 == ord(s[i + 1]):
			count += 1
	if count + 1 == len(s):
		return True
	else:
		return False

def run():
	n = int(input())
	for k in range(n):
		n = diverse(input())
		print('YES') if n == True else print('NO')
run()


from sys import *
n = int(input())
for line in stdin:
	line = sorted(line.strip(), key=lambda x: ord(x))
	i1 = ''
	razn = True
	for i in line:
		if i1 != '':
			if ord(i1) + 1 != ord(i):
				razn = False
		i1 = i
	if razn and sorted(line) == sorted(''.join(list(set(list(line))))):
		print('Yes')
	else:
		print('No')


for x in range(int(input())):
	s = input()
	s = list(s)
	s.sort()
	l = len(s)
	t = len(set(s))
	if t != l:
		print('NO')
	else:
		a = s[0]
		b = s[-1]
		if ord(b) - ord(a) - l + 1 == 0:
			print('YES')
		else:
			print('NO')


def func(a):
	a.sort()
	a = [ord(i) for i in a]
	l = len(a)
	if l == 1:
		return 'YES'
	else:
		for i in range(l - 1):
			diff = a[i + 1] - a[i]
			if a[i + 1] - a[i] == 0:
				return 'NO'
			if a[i + 1] - a[i] > 1:
				return 'NO'
	return 'YES'
t = int(input())
ans = []
for i in range(t):
	a = list(input())
	ans.append(func(a))
for i in ans:
	print(i)


for i in range(int(input())):
	s = list(map(ord, input()))
	x = min(s)
	y = max(s)
	if len(s) > 1:
		for i in s:
			if i == y and s.count(i) == 1:
				if i - 1 in s:
					flag = 0
				else:
					flag = 1
					break
			elif i == x and s.count(i) == 1:
				if i + 1 in s:
					flag = 0
				else:
					flag = 1
					break
			elif (i + 1 in s and i - 1 in s) and s.count(i) == 1:
				flag = 0
			else:
				flag = 1
				break
		if flag:
			print('No')
		else:
			print('Yes')
	elif len(s) == 1:
		print('Yes')
	else:
		print('No')


alpha = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
inputs = []
for i in range(n):
	s = input()
	inputs.append(s)
output = []
for j in range(len(inputs)):
	s = list(inputs[j])
	s.sort()
	new_s = ''.join(s)
	if new_s in alpha:
		output.append('YES')
	elif new_s not in alpha:
		output.append('NO')
for k in output:
	print(k)


t = int(input())
for i in range(t):
	s = input()
	ss = []
	flag = 0
	lenght = len(s)
	for i in range(lenght):
		ss.append(s[i])
	ss.sort()
	f = ''
	for i in range(lenght):
		f = f + ss[i]
	for i in range(lenght - 1):
		if ord(f[i]) + 1 != ord(f[i + 1]):
			print('NO\n')
			flag = 1
			break
	if flag != 1:
		print('Yes\n')


T = int(input())
for i in range(0, T):
	s = input()
	if len(s) == 1:
		print('Yes')
	else:
		temp = 0
		pos = [0] * 26
		for j in range(0, len(s)):
			pos[ord(s[j]) - 97] = pos[ord(s[j]) - 97] + 1
		for j in range(0, len(pos)):
			if pos[j] > 1:
				temp = 1
				break
		if temp == 1:
			print('No')
		else:
			s = sorted(s)
			flag = 0
			for j in range(1, len(s)):
				if ord(s[j]) - ord(s[j - 1]) != 1:
					flag = 1
					break
			if flag == 1:
				print('No')
			else:
				print('Yes')


import math, itertools, fractions, heapq, collections, bisect, sys, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()
alf = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

def summarizeList(l):
	sl = l
	a = sl[0]
	c = 1
	res = []
	for x in sl[1:]:
		if x == a:
			c += 1
		else:
			res.append([a, c])
			a = x
			c = 1
	res.append([a, c])
	return res

def main():
	n = I()
	ans = []
	for _ in range(n):
		s = S()
		l = set(s)
		cnt = [0] * 26
		if len(s) == len(l):
			for x in l:
				cnt[alf.index(x)] += 1
			sl = summarizeList(cnt)
			if len(sl) > 3:
				ans.append('No')
			elif len(sl) == 3 and sl[0][0] == 1:
				ans.append('No')
			else:
				ans.append('Yes')
		else:
			ans.append('No')
	for x in ans:
		print(x)
main()


n = int(input())
for i in range(n):
	s = input()
	arr = []
	flag = 1
	for i in range(len(s)):
		arr.append(ord(s[i]))
	arr.sort()
	for i in range(1, len(arr)):
		if arr[i] - arr[i - 1] != 1:
			print('No')
			flag = 0
			break
	if flag:
		print('Yes')


import sys
import math
import heapq
import bisect
from collections import defaultdict as dd

def valid(s):
	s.sort()
	for i in range(1, len(s)):
		if s[i] != s[i - 1] + 1:
			return 0
	return 1
for _ in range(int(input())):
	a = [ord(i) - 97 for i in input()]
	if valid(a):
		print('Yes')
	else:
		print('No')


n = int(input())
while n:
	n -= 1
	str_ = sorted(input())
	nums = [ord(i) for i in str_]
	len_ = len(nums)
	flag = True
	for i in range(len_ - 1):
		if nums[i + 1] - nums[i] != 1:
			print('No')
			flag = False
			break
	if flag:
		print('Yes')


from string import ascii_lowercase as abc
n = int(input())
for i in range(n):
	s = input()
	if len(set(s)) < len(s):
		print('No')
		continue
	so = ''.join(sorted(s))
	if so in abc:
		print('Yes')
	else:
		print('No')


N = int(input())
WORDS = [input() for _ in range(N)]
for word in WORDS:
	if len(word) == 1:
		print('Yes')
	elif len(set(word)) < len(word):
		print('No')
	else:
		w_int = sorted([ord(w) for w in word])
		found = False
		for (x, y) in zip(w_int, w_int[1:]):
			if y != x + 1:
				print('No')
				found = True
				break
		if not found:
			print('Yes')


q = int(input())
for i in range(0, q):
	p = list(input())
	a = len(p)
	p.sort()
	v = True
	for i in range(1, len(p)):
		if ord(p[i]) - ord(p[i - 1]) != 1:
			v = False
	if v and len(p) == a:
		print('YES')
	else:
		print('NO')


n = int(input())

def isConsecutive(arr):
	for i in range(len(arr)):
		if arr[i] - arr[0] != i:
			return False
	return True
for i in range(n):
	r = input()
	k = []
	isCool = True
	for j in range(len(r)):
		k.append(ord(r[j]))
	k.sort()
	if isConsecutive(k):
		print('Yes')
	else:
		print('No')


t = int(input())
while t:
	s = input()
	k = ''.join(sorted(s))
	if k in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
	else:
		print('No')
	t -= 1


import math
from collections import *
import sys
from functools import reduce

def get_ints():
	return map(int, input().strip().split())

def get_list():
	return list(get_ints())

def get_string():
	return list(input().strip().split())

def printxsp(*args):
	return print(*args, end='')

def printsp(*args):
	return print(*args, end=' ')
DIRECTIONS = [[0, 1], [0, -1], [1, 0], [1, -1]]
NEIGHBOURS = [(i, j) for i in range(-1, 2) for j in range(-1, 2) if i != 0 or j != 0]
OrdUnicode_a = ord('a')
OrdUnicode_A = ord('A')
CAPS_ALPHABETS = {chr(i + OrdUnicode_A): i for i in range(26)}
SMOL_ALPHABETS = {chr(i + OrdUnicode_a): i for i in range(26)}
UGLYMOD = int(1000000000.0) + 7
SEXYMOD = 998244353
MAXN = int(100000.0) + 1
INFINITY = float('inf')
for _testcases_ in range(int(input())):
	S = input()
	li = [SMOL_ALPHABETS[i] for i in S]
	li.sort()
	flag = True
	for i in range(len(li) - 1):
		if li[i] + 1 != li[i + 1]:
			flag = False
			break
	print('Yes' if flag else 'No')


from collections import *
n = int(input())
for i in range(n):
	s = list(input())
	s.sort()
	for i in range(len(s) - 1):
		if ord(s[i]) + 1 != ord(s[i + 1]):
			print('No')
			break
	else:
		print('Yes')


n = int(input())

def check(string):
	l = list(map(ord, list(st)))
	t = l.copy()
	final_list = []
	for num in l:
		l.remove(num)
		if num in l:
			return False
	(mini, maxi) = (min(t), max(t))
	for i in range(mini + 1, maxi):
		if i not in t:
			return False
	return True
for i in range(n):
	st = input()
	if check(st):
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	alpha_count = [-1] * 26
	flag = 0
	s = input()
	set_s = set(s)
	if len(set_s) == len(s):
		for c in s:
			alpha_count[ord(c) - 97] = 1
		first_index = alpha_count.index(1)
		last_index = max((idx for (idx, val) in enumerate(alpha_count) if val == 1))
		if last_index - first_index + 1 == len(s):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


kol = int(input())
while kol != 0:
	kol -= 1
	s = input()
	m = list()
	for i in s:
		m.append(ord(i))
	m.sort()
	t = True
	for i in range(len(s) - 1):
		if m[i + 1] - m[i] != 1:
			t = False
			break
	if t:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	t = 'abcdefghijklmnopqrstuvwxyz'
	s = ''.join(sorted(input()))
	if s in t:
		print('Yes')
	else:
		print('No')


x = [chr(i) for i in range(ord('a'), ord('z') + 1)]
n = int(input())
for i in range(n):
	s = input('')
	s = [s[i] for i in range(len(s))]
	s.sort()
	a = s[0]
	b = s[-1]
	if x[x.index(a):x.index(b) + 1] == s:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	str = input()
	check = 0
	str_sorted = sorted(str)
	for j in range(0, len(str_sorted) - 1):
		if ord(str_sorted[j + 1]) - ord(str_sorted[j]) != 1:
			print('No')
			check = 1
			break
	if not check:
		print('Yes')


n = int(input())
for i in range(n):
	s = input()
	s1 = ''.join(sorted(s))
	z = set()
	fl = 0
	for j in range(len(s1) - 1):
		if abs(ord(s1[j]) - ord(s1[j + 1])) != 1:
			print('No')
			fl = 1
			break
	if fl == 0:
		print('Yes')


n = int(input())
for i in range(0, n):
	al = [0] * 30
	s = str(input())
	mini = 10000
	maxi = 0
	test = 1
	for j in range(0, len(s)):
		if al[ord(s[j]) - ord('a')] == 1:
			test = 0
			break
		al[ord(s[j]) - ord('a')] = 1
		if mini > ord(s[j]):
			mini = ord(s[j])
		if maxi < ord(s[j]):
			maxi = ord(s[j])
	if test == 0:
		print('no')
		continue
	if maxi - mini + 1 == len(s):
		print('yes')
	else:
		print('no')


n = int(input())
inp = []
for i in range(n):
	inp.append(input())
for i in range(n):
	b = True
	s = inp[i]
	mas = []
	for j in s:
		mas.append(ord(j))
	mas.sort()
	for j in range(1, len(mas)):
		if mas[j] != mas[j - 1] + 1:
			b = False
			break
	if b:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	s = set()
	min_value = float('inf')
	max_value = float('-inf')
	for i in input():
		if ord(i) in s:
			print('NO')
			break
		else:
			s.add(ord(i))
			if ord(i) > max_value:
				max_value = ord(i)
			if ord(i) < min_value:
				min_value = ord(i)
	else:
		if len(s) == max_value - min_value + 1:
			print('YES')
		else:
			print('NO')


N = int(input())
for _ in range(N):
	string = input()
	alphabet_table = [0] * 26
	result = 'Yes'
	for c in string:
		if alphabet_table[ord(c) - ord('a')] == 1:
			result = 'No'
			break
		else:
			alphabet_table[ord(c) - ord('a')] = 1
	table_string = ''.join([str(x) for x in alphabet_table])
	if len(list(filter(lambda x: x != '', table_string.split('0')))) > 1:
		result = 'No'
	print(result)


t = int(input())
for i in range(t):
	n = list(input())
	n.sort()
	first = ord(n[0])
	last = ord(n[-1])
	if len(n) == len(set(n)):
		if last - first == len(n) - 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = list(input())
	s.sort()
	flag = True
	for i in range(1, len(s)):
		if ord(s[i]) != ord(s[i - 1]) + 1:
			flag = False
			break
	if flag == True:
		print('Yes')
	else:
		print('No')


count = input()
count = int(count)
i = 0
charax = 'abcdefghijklmnopqrstuvwxyz'
while i < count:
	string = input()
	string = string.strip()
	if len(string) == 1:
		print('yes')
	else:
		element2 = []
		ii = 0
		ic = len(string)
		while ii < ic:
			element2.append(string[ii])
			ii += 1
		element2.sort()
		temp = ''
		for iu in element2:
			temp = temp + iu
		if temp in charax:
			print('yes')
		else:
			print('no')
	i += 1


n = int(input())
ans = []
for i in range(n):
	s = input()
	a = sorted([ord(x) for x in s])
	if a == [j + a[0] for j in range(len(s))]:
		ans.append('YES')
	else:
		ans.append('NO')
for x in ans:
	print(x)


try:
	n = int(input())
	for i in range(0, n):
		s = input()
		s = list(s)
		s.sort()
		k = len(s)
		m = set(s)
		p = len(m)
		if k != p:
			print('No')
		else:
			c = 0
			a1 = ord(s[0])
			for j in range(1, len(s) + 1):
				if j < len(s) and ord(s[j]) == a1 + j:
					c += 1
			if c + 1 == len(s):
				print('Yes')
			else:
				print('No')
except:
	pass


import math
import sys
import re
n = int(input())
for x in range(n):
	s = input()
	l = 'abcdefghijklmnopqrstuvwxyz'
	ss = ''.join(sorted(s))
	if ss in l:
		print('YES')
	else:
		print('NO')


def main():
	n = int(input())
	i = 0
	while i < n:
		s = input()
		alf = [0] * 26
		maior = -1
		menor = 1000000
		res = -1
		for k in range(len(s)):
			if maior < ord(s[k]) - 97:
				maior = ord(s[k]) - 97
			if menor > ord(s[k]) - 97:
				menor = ord(s[k]) - 97
			if alf[ord(s[k]) - 97] == 0:
				alf[ord(s[k]) - 97] += 1
			else:
				res = 0
				break
		j = menor
		while j <= maior:
			if alf[j] == 1:
				j += 1
			else:
				res = 0
				break
		if res == 0:
			print('No')
		else:
			print('Yes')
		i += 1
main()


n = int(input())
s1 = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	f = 0
	s = input()
	word = []
	for j in range(len(s)):
		if s[j] not in word:
			word.append(s[j])
		else:
			f = 1
			break
	if f != 1:
		word.sort()
		if ''.join(word) not in s1:
			f = 2
	if f == 0:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	s = sorted(input())
	if s == type(s)(map(chr, range(ord(s[0]), ord(s[-1]) + 1))):
		print('Yes')
	else:
		print('No')


from __future__ import absolute_import, division, print_function, unicode_literals
import sys
DEBUG = len(sys.argv) > 1 and sys.argv[1] == '-d'

def LOG(*argv):
	if DEBUG:
		print(*argv, file=sys.stderr)

def CHECK(cond, err_msg=''):
	if DEBUG:
		assert cond, err_msg

def CHECK_EQ(a, b, err_msg=''):
	CHECK(a == b, err_msg='{} v.s. {} {}'.format(a, b, err_msg))

def readval(typ=int):
	return typ(input())

def readvals(typ=int):
	return map(typ, input().split())

def solve(s):
	char_indices = map(ord, s)
	from collections import Counter
	ctr = Counter(char_indices)
	LOG(ctr)
	prev_k = None
	for (k, v) in sorted(ctr.items()):
		if v != 1:
			return False
		if prev_k and k - prev_k != 1:
			return False
		prev_k = k
	return True
CHECK(solve('8'))
CHECK(solve('fced'))
CHECK_EQ(solve('bad'), False)
N = readval()
for i in range(N):
	s = readval(str)
	if solve(s):
		print('Yes')
	else:
		print('No')


N = int(input())
for _ in range(N):
	string = input()
	a = sorted(string)
	before = a[0]
	flag = 1
	for x in a[1:]:
		if ord(before) + 1 == ord(x):
			before = x
		else:
			flag = 0
			break
	if flag:
		print('YES')
	else:
		print('NO')


alphabet = 'abcdefghijklmnopqrstuvwxyz'
for ct in range(int(input())):
	s = input()
	print('Yes') if ''.join(map(str, sorted(s))) in alphabet else print('No')


alph = 'abcdefghijklmnopqrstuvwxyz'
for i in range(int(input())):
	s = ''.join(sorted(input()))
	if alph.count(s, 0, len(alph)) > 0:
		print('Yes')
	else:
		print('No')


n = int(input())
l = []
c = 0
for i in range(n):
	l.append(list(map(ord, sorted(input()))))
for i in l:
	if len(i) > 1:
		for j in range(1, len(i)):
			if i[j] - i[j - 1] == 1:
				c += 1
			else:
				c = 0
				break
		if c > 0:
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	l1 = l2 = size = 0
	a = input()
	a = list(''.join(sorted(a)))
	b = []
	size = len(a)
	if len(a) != 1:
		for j in range(len(a) - 1):
			b.append(ord(a[j + 1]) - ord(a[j]))
		l1 = len(a)
		l2 = len(set(a))
	if l1 == l2 and sum(b) == len(a) - 1 or size == 1:
		print('Yes')
	else:
		print('No')


a = int(input())
key = False
abc = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for i in range(a):
	s = sorted(input())
	c = []
	for i in s:
		if i not in c:
			c.append(i)
		else:
			print('NO')
			key = True
			break
	if key:
		key = False
		continue
	if abc.index(c[0]) + len(c) <= 26 and c == abc[abc.index(c[0]):abc.index(c[0]) + len(c)]:
		print('YES')
	else:
		print('NO')


import math
from collections import defaultdict, Counter, deque

def primeFactor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i ** 2 <= n:
		if n % i == 0:
			return i
		i += 1
	return n

def main():
	s = input()
	n = len(s)
	if n == 1:
		print('YES')
	else:
		s = sorted(s)
		curr = ord(s[0])
		for i in range(1, n):
			if curr + 1 == ord(s[i]):
				curr += 1
			else:
				print('NO')
				return
		print('YES')
		return
t = int(input())
for _ in range(t):
	main()


def main():
	alph = 'abcdefghijklmnopqrstuvwxyz'
	n = int(input())
	a = []
	for i in range(n):
		s = input()
		a.append(s)
	for i in range(n):
		s = list(a[i])
		s.sort()
		k = ''
		for j in range(len(s)):
			k += s[j]
		if alph.find(k) != -1:
			print('YES')
		else:
			print('NO')
main()


n = int(input())
for _ in range(n):
	s = ''.join(sorted(input()))
	letters = []
	for i in range(len(s) - 1):
		curr = ord(s[i])
		if curr in letters:
			print('No')
			break
		else:
			letters.append(curr)
		if i == 0 or i < len(s) - 1:
			nextLetter = ord(s[i + 1])
			if curr > nextLetter + 1 or curr < nextLetter - 1 or curr == nextLetter:
				print('No')
				break
		if i == len(s) - 1 or i > 0:
			prevLetter = ord(s[i - 1])
			if curr > prevLetter + 1 or curr < prevLetter - 1:
				print('No')
				break
	else:
		print('Yes')


for i in range(int(input())):
	a = input()
	p = 1
	temp = []
	for i in a:
		temp.append(i)
	temp.sort()
	a = temp
	for i in range(len(a) - 1):
		if a[i] != 'z':
			if ord(a[i + 1]) == ord(a[i]) + 1:
				p = 1
			else:
				p = 0
				break
		elif ord(a[i + 1]) == ord('a'):
			p = 1
		else:
			p = 0
			break
	if p == 1:
		print('yes')
	else:
		print('no')


import string
n = int(input())
letters = ' '.join(string.ascii_letters[:26]).split()
for i in range(n):
	word = input()
	a = []
	b = []
	for j in range(len(word)):
		a.append(letters.index(word[j]))
		b.append(letters.count(word[j]))
	a = sorted(a)
	b = sorted(b)
	if [j for j in range(a[0], a[0] + len(a))] == a and b[-1] == 1:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	s = input()
	l = sorted(s)
	result = any((True for i in range(1, len(l)) if ord(l[i]) - ord(l[i - 1]) != 1))
	print('No' if result else 'Yes')


n = int(input())
alphabet = 'abcdefghijklmnopqrstuvwxyz'

def is_diverse(s):
	s = list(s)
	s.sort()
	s = ''.join(s)
	if s in alphabet:
		return True
	else:
		return False
for i in range(n):
	a = input()
	if is_diverse(a):
		print('Yes')
	else:
		print('No')


al = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for k in range(int(input())):
	s = list(input())
	if len(s) > len(set(s)):
		print('No')
	else:
		s = sorted(s)
		fa = False
		for k in range(26 - len(s) + 1):
			if al[k:k + len(s)] == s:
				print('Yes')
				fa = 'True'
				break
		if not fa:
			print('No')


n = int(input())
L = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for i in range(n):
	letters = input()
	M = list(letters)
	M.sort()
	a = 0
	if len(M) == 1:
		a = 0
	else:
		M.sort()
		for j in range(len(M) - 1):
			if M[j] == M[j + 1]:
				a = 1
			break
		if a == 0:
			M.sort()
			for j in range(25):
				for i in range(len(M) - 1):
					if M[i] == L[j] and M[i + 1] != L[j + 1]:
						a = 1
	if a == 0:
		print('yes')
	else:
		print('no')


t = int(input())
z = 'abcdefghijklmnopqrstuvwxyz'
z = list(z)
for i in range(t):
	s = input()
	s = list(s)
	s.sort()
	b = set(s)
	l = len(s)
	if len(s) != l:
		print('no')
	else:
		y = z.index(s[0])
		v = z.index(s[l - 1])
		x = z[y:v + 1]
		if x == s:
			print('YES')
		else:
			print('NO')


n = int(input())
for _ in range(n):
	s = input()
	cnt = [0] * 26
	for j in s:
		cnt[ord(j) - 97] += 1
	start = False
	finish = False
	ok = True
	for i in range(26):
		if cnt[i] > 1:
			ok = False
			break
		if finish and cnt[i] == 1:
			ok = False
			break
		if not start and cnt[i] == 1:
			start = True
		elif start and (not cnt[i]):
			start = False
			finish = True
	print('yes' if ok else 'no')


n = int(input())
for i in range(n):
	m = list(input())
	l = len(m)
	k = 'YES'
	m.sort()
	for j in range(l - 1):
		if ord(m[j]) + 1 != ord(m[j + 1]):
			k = 'NO'
	print(k)


def fun(s):
	n = len(s)
	if n > 26:
		return 'no'
	else:
		list = []
		for i in range(26):
			list.append(0)
		for ch in s:
			list[ord(ch) - 97] += 1
		for i in range(26):
			if list[i] >= 2:
				return 'no'
			elif list[i] == 1:
				break
		count = 0
		for j in range(i, 26):
			if list[j] == 1:
				count += 1
			else:
				break
		if count == n:
			return 'yes'
		else:
			return 'no'
t = int(input())
for loop in range(t):
	s = input()
	print(fun(s))


n = int(input())
for _ in range(n):
	s = input()
	print('YES' if ord(max(s)) - ord(min(s)) == len(s) - 1 and len(set(s)) == len(s) else 'NO')


n = int(input().strip())
for i in range(n):
	s = str(input().strip())
	r = set(s)
	if len(r) == len(s):
		r = sorted(list(r))
		flag = True
		for x in range(len(r) - 1):
			if ord(r[x + 1]) != ord(r[x]) + 1:
				flag = False
				break
		if flag == True:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for t in range(int(input())):
	s = list(input())
	d = list(set(s))
	if len(d) < len(s):
		print('No')
	else:
		s.sort()
		e = 1
		for i in range(1, len(s)):
			if ord(s[i]) - ord(s[i - 1]) == 1:
				e += 1
		if e == len(s):
			print('Yes')
		else:
			print('No')


n = int(input())
for i in range(n):
	flag = 0
	l = []
	p = input()
	for j in range(len(p)):
		l.append(ord(p[j]))
	l.sort()
	for j in range(len(l) - 1):
		if l[j + 1] - l[j] != 1:
			print('NO')
			flag = 1
			break
	if flag == 0:
		print('YES')


for _ in range(int(input())):
	a = input()
	k = []
	for i in a:
		k.append(i)
	s = set(k)
	if len(s) != len(k):
		print('No')
	else:
		k.sort()
		i = 0
		while i < len(k) - 1:
			if ord(k[i + 1]) - ord(k[i]) != 1:
				print('No')
				break
			i = i + 1
		else:
			print('Yes')


def diverseString(a):
	cnt = 0
	start = min(a)
	for i in range(ord(start), ord(start) + len(a)):
		if a.count(chr(i)) != 1:
			cnt += 1
			break
	if cnt == 0:
		return 'Yes'
	else:
		return 'No'
t = int(input())
for _ in range(t):
	a = input()
	print(diverseString(a))


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x))
for _ in range(get_int()):
	s = sorted(get_string())
	c = ord(s[0])
	flag = True
	for i in range(1, len(s)):
		if c + 1 != ord(s[i]):
			flag = False
			break
		else:
			c = ord(s[i])
	if flag:
		print('YES')
	else:
		print('NO')


import os
import sys
from io import BytesIO, IOBase
import math
from decimal import Decimal
from decimal import *
from collections import defaultdict, deque
import heapq
from decimal import Decimal
getcontext().prec = 25
abcd = 'abcdefghijklmnopqrstuvwxyz'
MOD = 1000000007
BUFSIZE = 8192
from bisect import bisect_left, bisect_right

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	s = list(sorted(list(input())))
	ans = 'YES'
	for i in range(len(s) - 1):
		if ord(s[i + 1]) - ord(s[i]) != 1:
			ans = 'NO'
	print(ans)


x = input()
xx = int(x, 10)
tt = range(xx)
for i in tt:
	y = input()
	y = sorted(y)
	z = len(y)
	t = 0
	for j in range(1, z, 1):
		if abs(ord(y[j]) - ord(y[j - 1])) != 1:
			t = 1
			break
	if t == 1:
		print('NO')
	else:
		print('YES')


from string import ascii_lowercase
q = int(input())

def yes_or_no(jopa):
	if ''.join(sorted(jopa)) not in ascii_lowercase:
		return 'No'
	return 'Yes'
for _ in range(q):
	print(yes_or_no(input()))


t = int(input())
for _ in range(t):
	s = input()
	s = sorted(s)
	ok = True
	for i in range(1, len(s)):
		if ord(s[i]) - ord(s[i - 1]) == 1:
			continue
		else:
			ok = False
			break
	if ok:
		print('Yes')
	else:
		print('No')


q = int(input())
for u in range(q):
	w = list(input())
	e = []
	w.sort()
	r = ord(w[0]) - 1
	for i in range(len(w)):
		if w[i] not in e:
			e.append(w[i])
			if r + 1 == ord(w[i]):
				r = ord(w[i])
			else:
				print('No')
				break
		else:
			print('No')
			break
	else:
		print('Yes')


n = int(input())
array = []
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	array.append(input())
for i in array:
	var = 1
	a = sorted(i)
	start = alphabet.index(a[0])
	if len(a) <= 26:
		for i in range(len(a)):
			if a[i] != alphabet[i + start]:
				var = 0
				break
	else:
		var = 0
	if var == 1:
		print('yes')
	else:
		print('no')


for _ in range(int(input())):
	s = input()
	s = list(s)
	if len(set(s)) < len(s):
		print('NO')
		continue
	s.sort()
	if ord(s[-1]) - ord(s[0]) + 1 != len(s):
		print('NO')
	else:
		print('YES')


e = [chr(i) for i in range(97, 123)]
ans = []
n = int(input())
for i in range(n):
	st = input()
	l = len(st)
	answer = 'No'
	st = sorted(list(st))
	st2 = ''.join(st)
	for j in range(26):
		a = ''.join(e[j:j + l])
		if st2 in a:
			answer = 'Yes'
			break
	ans.append(answer)
for i in range(n):
	print(ans[i])


y = 'abcdefghijklmnopqrstuvwxyz'
for i in range(int(input())):
	x = sorted(input())
	print('YES' if ''.join(x) in y else 'NO')


n = int(input())
for _ in range(n):
	x = input()
	srt = sorted(x)
	r = set(srt)
	if len(r) != len(srt) or ord(srt[-1]) != ord(srt[0]) + len(r) - 1:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	s = list(map(ord, input()))
	s.sort()
	fl = 1
	for i in range(len(s) - 1):
		if s[i + 1] - s[i] != 1:
			fl = 0
			break
	print('Yes') if fl == 1 else print('No')


kolvo = int(input())
alf = 'abcdefghijklmnopqrstuvwxyz'
for i in range(kolvo):
	n = input()
	n = list(n)
	n.sort()
	s = ''
	for k in n:
		s = s + str(k)
	if s in alf:
		print('YES')
	else:
		print('NO')


t = int(input())
while t:
	t -= 1
	s = input().strip()
	if len(set(s)) != len(s):
		print('No')
	else:
		s = sorted(s)
		f = 0
		for i in range(1, len(s)):
			if abs(ord(s[i]) - ord(s[i - 1])) != 1:
				f = 1
				break
		if f == 1:
			print('No')
		else:
			print('Yes')


def checkdiverse(str):
	lst = list()
	flag = False
	for i in str:
		lst.append(i)
	lst2 = sorted(lst)
	for (i, j) in enumerate(lst2):
		if i == len(lst2) - 1:
			break
		else:
			x = ord(j)
			y = ord(lst2[(i + 1) % len(lst2)])
		if x + 1 == y:
			continue
		else:
			return True
cases = int(input())
for i in range(cases):
	str = input()
	if checkdiverse(str):
		print('No')
	else:
		print('Yes')


user_input = input()
n = int(user_input)
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for i in range(0, n):
	string = input()
	string1 = list(string)
	string1.sort()
	flag = 0
	tam = len(string1)
	for j in range(0, tam):
		for k in range(0, 26):
			if string1[j] == alphabet[k]:
				o = j
				m = k
				cnt = 0
				while m < 26 and o < tam and (string1[o] == alphabet[m]):
					cnt = cnt + 1
					o = o + 1
					m = m + 1
				if cnt == tam:
					print('Yes')
				else:
					print('No')
				flag = 1
			if flag == 1:
				break
		if flag == 1:
			break


for i in range(int(input())):
	s = sorted(input())
	if len(s) == 1:
		if s == 'z' or s == 'a':
			print('NO')
		else:
			print('YES')
	elif len(set(s)) == len(s) and ord(s[-1]) - ord(s[0]) == len(s) - 1:
		print('YES')
	else:
		print('NO')


from collections import OrderedDict
import string
n = int(input())
for _ in range(n):
	s = input()
	a = set(s)
	if len(a) != len(s):
		print('No')
		continue
	d = OrderedDict()
	for i in string.ascii_lowercase:
		d[i] = 1 if i in a else 0
	state = 0
	for i in d.values():
		if state == 0:
			if i == 0:
				pass
			else:
				state = 1
		elif state == 1:
			if i == 0:
				state = 2
			else:
				pass
		elif i == 0:
			pass
		else:
			print('No')
			state = 3
			break
	if state != 3:
		print('Yes')


def check(s):
	a = [x for x in s]
	a.sort()
	for i in range(len(a) - 1):
		if ord(a[i + 1]) - ord(a[i]) != 1:
			return False
	return True
n = int(input())
for i in range(n):
	s = input().strip()
	if check(s):
		print('Yes')
	else:
		print('No')


n = int(input())
l = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'a']
for i in range(n):
	s = input()
	arr = [x for x in s]
	arr.sort()
	var = 0
	for x in range(len(arr) - 1):
		for y in range(len(l) - 1):
			if arr[x] == l[y] and arr[x + 1] != l[y + 1]:
				var = 1
				break
	if var == 1:
		print('No')
	else:
		print('Yes')


t = int(input())
l = []
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(t):
	n = input()
	s1 = sorted(n)
	s = ''.join(s1)
	if s in alphabet:
		l.append('Yes')
	else:
		l.append('No')
for i in l:
	print(i)


import random

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())
t = ii()
while t > 0:
	s = input()
	s = sorted(s)
	ff = True
	for i in range(0, len(s) - 1):
		if abs(ord(s[i + 1]) - ord(s[i])) != 1:
			ff = False
			break
	if ff:
		print('Yes')
	else:
		print('No')
	t -= 1


alphabet = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
for i in range(n):
	mot = list(input())
	mot.sort()
	mot = ''.join(mot)
	if mot in alphabet and len(mot) == len(set(mot)):
		print('Yes')
	else:
		print('No')


q = int(input())
for _ in range(q):
	s = input()
	n = len(s)
	l = set([ord(c) for c in s])
	l = list(sorted(l))
	if len(l) < n:
		print('No')
		continue
	for (i, j) in zip(l[:-1], l[1:]):
		if j - 1 != i:
			print('No')
			break
	else:
		print('Yes')


def chk(s):
	s.sort()
	for i in range(1, len(s)):
		if ord(s[i]) != ord(s[i - 1]) + 1:
			return False
	return True

def check(s):
	c = [0] * 26
	for i in s:
		c[ord(i) - 97] += 1
		if c[ord(i) - 97] >= 2:
			return False
	return True
n = int(input())
done = True
for _ in range(n):
	s = list(input())
	print('Yes' if chk(s) and check(s) else 'No')


alph = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
for i in range(n):
	s = sorted(list(input()))
	print('yneos'[''.join(s) not in alph::2])


def check(t, n):
	for _ in range(t):
		st = input()
		res = ''
		st = sorted(st)
		for i in st:
			res += i
		if res in n:
			print('yes')
		else:
			print('no')
n = 'abcdefghijklmnopqrstuvwxyz'
t = int(input())
check(t, n)


for i in range(int(input())):
	a = input()
	c = 0
	li = []
	z = 'Yes'
	for i in range(len(a)):
		li.append(ord(a[i]))
	b = min(li)
	for i in range(len(a)):
		if li.count(b) != 0:
			pass
		else:
			z = ''
			print('No')
			break
		b += 1
	if z == 'Yes':
		print('Yes')


t = int(input())
for _ in range(t):
	s = input()
	st = set([c for c in s])
	if len(st) != len(s):
		print('No')
		continue
	f = [False for i in range(26)]
	for c in s:
		f[ord(c) - ord('a')] = True
	cnt = 0
	for i in range(26):
		if f[i]:
			cnt += 1
			for j in range(i, 26):
				if f[j]:
					f[j] = False
				else:
					break
	if cnt == 1:
		print('Yes')
	else:
		print('No')


test = int(input())
for i in range(test):
	letter = input()
	flag = True
	temp = ''.join(sorted(letter))
	for i in range(len(letter) - 1):
		if temp[i] < temp[i + 1] and abs(ord(temp[i]) - ord(temp[i + 1])) == 1:
			flag = True
		else:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('No')


n = int(input())

def hassame(t):
	k = str(t)
	y = sorted(k)
	z = list(y)
	for i in range(len(k) - 1):
		if z[0] == z[i + 1]:
			return False
	return True
for i in range(n):
	a = str(input())
	b = sorted(a)
	c = list(b)
	if hassame(a) == False:
		print('NO')
	else:
		qwe = True
		for j in range(len(b) - 1):
			if ord(c[j]) != ord(c[j + 1]) - 1:
				print('NO')
				qwe = False
				break
		if qwe == True:
			print('YES')


n = int(input())
for i in range(n):
	s = input()
	a = []
	for j in range(len(s)):
		a.append(ord(s[j]))
	a.sort()
	flag = True
	for j in range(len(s) - 1):
		if a[j] == a[j + 1] or a[j] + 1 != a[j + 1]:
			flag = False
			break
	if flag:
		print('Yes')
	else:
		print('No')


a = 'abcdefghijklmnopqrstuvwxyz'
for i in range(int(input())):
	s = list(input())
	k = 0
	for i in s:
		if s.count(i) > 1:
			k = 1
			break
	if k != 1:
		s = sorted(s)
		x = ''.join((i for i in s))
		x = x.strip()
		ind = a.index(x[0]) - 1
		for i in x:
			y = a.index(i)
			if y - ind == 1:
				ind = y
			else:
				k = 1
				break
	if k == 1:
		print('NO')
	else:
		print('YES')


n = int(input())
for j in range(n):
	a = list(input())
	fuck = len(a)
	b = list(set(a))
	suck = len(b)
	b.sort()
	if fuck == suck:
		count = 0
		for i in range(suck - 1):
			if ord(b[i]) + 1 == ord(b[i + 1]):
				count += 1
		if count == suck - 1:
			print('yes')
		else:
			print('no')
	else:
		print('no')


t = int(input())
for x in range(t):
	s = input().rstrip()
	s = [i for i in s]
	s.sort()
	diff = 1
	if len(s) == 1:
		print('yes')
		continue
	count = 1
	for i in range(1, len(s)):
		if ord(s[i]) - ord(s[i - 1]) == diff:
			count += 1
	if count == len(s):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	s = list(map(ord, sorted(input())))
	for i in range(len(s)):
		if i != s[i] - s[0]:
			print('NO')
			break
	else:
		print('YES')


n = int(input())
for i in range(n):
	cnt = 0
	s = input()
	l = []
	for x in s:
		l.append(x)
	l.sort()
	for j in range(1, len(l)):
		if abs(ord(l[j]) - ord(l[j - 1])) == 1:
			cnt += 1
	if cnt == len(s) - 1:
		print('Yes')
	else:
		print('No')


for _ in ' ' * int(input()):
	a = input()
	k = 'YES'
	b = sorted(list(set(a)))[:len(set(a)) - 1]
	for i in range(len(b)):
		if chr(ord(b[i]) + 1) not in a or len(a) != len(b) + 1:
			k = 'NO'
			break
	if len(a) != len(b) + 1:
		k = 'NO'
	print(k)


t = int(input())
for _ in range(t):
	n = input()
	n = sorted(n)
	m = []
	p = set(n)
	if len(n) == 1:
		print('YES')
	else:
		for i in range(1, len(n)):
			a = ord(n[i]) - ord(n[i - 1])
			m.append(a)
		if m.count(1) == len(n) - 1:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	s = input()
	if len(s) == 1:
		print('YES')
		continue
	c = 1
	s = ''.join(sorted(s))
	for i in range(len(s) - 1):
		d = ord(s[i])
		e = ord(s[i + 1])
		if abs(e - d) != 1:
			c = 0
	if c > 0 and len(set(s)) == len(s):
		print('YES')
	else:
		print('NO')


def f(a):
	a = list(a)
	if len(a) != len(set(a)):
		return 'No'
	a = list(map(lambda x: ord(x), a))
	a.sort()
	for i in range(0, len(a) - 1):
		if a[i + 1] - a[i] != 1:
			return 'No'
	return 'Yes'
for i in range(int(input())):
	print(f(input()))


BS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def to_base(s, b):
	res = ''
	while s:
		res += BS[s % b]
		s //= b
	return res[::-1] or '0'
alpha = 'abcdefghijklmnopqrstuvwxyz'
t = int(input())
for i in range(t):
	a = input()
	if ''.join(sorted(a)) in alpha:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	s = list(input())
	n = len(s)
	if n != len(set(s)):
		print('NO')
		continue
	mx = ord(max(s))
	mi = ord(min(s))
	if mx - mi + 1 == n:
		print('YES')
	else:
		print('NO')


GI = lambda : int(input())
GIS = lambda : map(int, input().split())
LGIS = lambda : list(GIS())

def main():
	for t in range(GI()):
		s = sorted(input())
		for i in range(len(s) - 1):
			if ord(s[i + 1]) - ord(s[i]) != 1:
				print('No')
				break
		else:
			print('Yes')
main()


ch = list('abcdefghijklmnopqrstuvwxyz')
val = list(range(1, 27))
for i in range(int(input())):
	l = []
	s = input()
	for i in s:
		l.append(val[ch.index(i)])
	if len(list(set(s))) == len(s):
		if max(l) - min(l) - 1 == len(s) - 2:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


n = int(input())
for i in range(n):
	flag = 'Yes'
	s = input()
	s = list(s)
	s.sort()
	ss = set()
	ss.add(s[0])
	for i in range(1, len(s)):
		ss.add(s[i])
		if abs(ord(s[i]) - ord(s[i - 1])) > 1:
			flag = 'No'
	if len(ss) != len(s):
		flag = 'No'
	print(flag)


n = int(input())
for i in range(n):
	s = str(input())
	s = sorted(s)
	q = 0
	if len(s) == 1:
		print('Yes')
		continue
	for j in range(1, len(s)):
		if abs(ord(s[j]) - ord(s[j - 1])) == 1:
			q = 1
		else:
			q = 0
			break
	for j in range(1, len(s)):
		if s[j] == s[j - 1]:
			q = 0
			break
	if q == 1:
		print('Yes')
	else:
		print('No')


ABC = 'abcdefghijklmnopqrstuvwxyz'

def prov(s):
	i = 0
	for j in range(len(s)):
		if i == 0:
			if s.find(s[j], j + 1, len(s)) != -1:
				i = 1
	return i == 0

def lastchar(s):
	i = -1
	for j in range(26):
		if i == -1:
			if s.find(ABC[-j - 1]) != -1:
				i = 26 - j - 1
	return i

def firstchar(s):
	i = -1
	for j in range(26):
		if i == -1:
			if s.find(ABC[j]) != -1:
				i = j
	return i
ans = []
n = int(input())
for i in range(n):
	s = str(input())
	if prov(s):
		if lastchar(s) - firstchar(s) + 1 == len(s):
			ans.append('Yes')
		else:
			ans.append('No')
	else:
		ans.append('No')
for s in ans:
	print(s)


n = int(input())
words = []
for _ in range(n):
	words.append(input())

def check_word(word):
	found = [0] * 26
	for i in word:
		if found[ord(i) - 97]:
			return 'No'
		else:
			found[ord(i) - 97] = 1
	start = stop = 0
	for i in found:
		if not start:
			if i:
				start = 1
		elif start and (not stop):
			if not i:
				stop = 1
		elif stop:
			if i:
				return 'No'
	return 'Yes'
for word in words:
	print(check_word(word))


vocab = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10, 'k': 11, 'l': 12, 'm': 13, 'n': 14, 'o': 15, 'p': 16, 'q': 17, 'r': 18, 's': 19, 't': 20, 'u': 21, 'v': 22, 'w': 23, 'x': 24, 'y': 25, 'z': 26}
for _ in range(int(input())):
	string = input()
	result = []
	temp = [True] * 26
	for i in string:
		if temp[vocab[i] - 1]:
			result.append(vocab[i])
			temp[vocab[i] - 1] = False
		else:
			print('No')
			break
	else:
		temp = 0
		result.sort(reverse=True)
		temp = result.pop()
		while result:
			temp += 1
			if temp != result.pop():
				print('No')
				break
		else:
			print('Yes')


def solve(inp):
	res = [False] * 26
	alphabet = 'abcdefghijklmnopqrstuvwxyz'
	for char in inp:
		ind = alphabet.find(char)
		if res[ind] == False:
			res[ind] = True
		else:
			print('No')
			return False
	start = res.index(True)
	end = len(res) - res[::-1].index(True) - 1
	for i in range(start, end):
		if res[i] == False:
			print('No')
			return False
	print('Yes')
	return True
num_of_strings = int(input())
for _ in range(num_of_strings):
	inp = input()
	solve(inp)


number = input()
count = 0
for i in range(int(number)):
	input_string = input()
	sorted_list = sorted(input_string)
	for i in range(len(sorted_list) - 1):
		if chr(ord(sorted_list[i]) + 1) == sorted_list[i + 1]:
			count += 1
		else:
			continue
	if count + 1 == len(input_string):
		print('YES')
		count = 0
	else:
		print('NO')
		count = 0


n = int(input())
for i in range(n):
	word = input()
	res = []
	for i in word:
		res.append(i)
	res = sorted(res)
	prev = None
	mark = False
	for i in res:
		if prev != None and ord(i) - 1 != ord(prev):
			mark = True
			break
		prev = i
	if mark:
		print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	a = list(input())
	if len(a) == len(set(a)):
		k = sorted(a)
		flag = True
		for j in range(1, len(a)):
			if ord(k[j]) - ord(k[j - 1]) == 1:
				continue
			else:
				flag = False
				print('No')
				break
		if flag:
			print('Yes')
	else:
		print('No')


n = int(input())
t = []
ans = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	s = input()
	for a in s:
		t.append(a)
		t.sort()
		tmp = ''.join(t)
	if tmp in ans:
		print('Yes')
		tmp = ''
		t = []
	else:
		print('No')
		tmp = ''
		t = []


import sys

def is_diverse(s: str) -> bool:
	s = sorted(s)
	for i in range(len(s) - 1):
		if abs(ord(s[i + 1]) - ord(s[i])) != 1:
			return False
	return True

def answer(result: bool) -> str:
	return 'yes' if result else 'no'
_ = int(input())
print('\n'.join(map(answer, map(is_diverse, map(str.strip, sys.stdin)))))


import sys
from functools import reduce
from collections import defaultdict

def diverseStrings(strings):
	alphabets = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
	for s in strings:
		if len(set(s)) != len(list(s)):
			print('No')
		else:
			tmp = []
			for c in list(s):
				tmp.append(ord(c))
			if sorted(tmp) == [m for m in range(min(tmp), max(tmp) + 1)]:
				print('Yes')
			else:
				print('No')

def io():
	strings = []
	totalStrings = int(sys.stdin.readline(), 10)
	strings = [] * totalStrings
	for n in range(0, totalStrings):
		strings.append(sys.stdin.readline().strip())
	diverseStrings(strings)
io()


n = int(input())
for i in range(n):
	s = list([ord(x) for x in list(input())])
	if sorted(s) == list(range(min(s), max(s) + 1)):
		print('Yes')
	else:
		print('No')


from string import ascii_lowercase as alphabet
for i in range(int(input())):
	s = input()
	ss = ''.join(sorted(list(s)))
	if ss in alphabet and len(set(list(s))) == len(s):
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	freq = {}
	s = input()
	for x in s:
		freq[x] = freq.get(x, 0) + 1
	for k in freq:
		if freq[k] > 1:
			print('No')
			break
	else:
		ke = list(freq.keys())
		ke.sort()
		for i in range(1, len(ke)):
			if not abs(ord(ke[i]) - ord(ke[i - 1])) == 1:
				print('No')
				break
		else:
			print('Yes')


n = int(input())
res = list()
for i in range(n):
	s = sorted(input())
	l = ord(s[0])
	r = ord(s[len(s) - 1])
	a = list((chr(i + l) for i in range(r - l + 1)))
	if a == s:
		res.append('Yes')
	else:
		res.append('No')
for i in range(n):
	print(res[i])


import string
lc = string.ascii_lowercase
n = int(input())
for i in range(n):
	ans = 'No'
	s = input()
	cnt = set()
	for j in range(len(s)):
		cnt.add(s[j])
	if len(s) == len(cnt):
		ss = ''.join(list(sorted(cnt)))
		for p in range(26):
			for q in range(p, 26):
				if lc[p:q + 1] == ss:
					ans = 'Yes'
	else:
		0
	print(ans)


n = int(input())
ans = 0
for i in range(0, n):
	ans = 0
	k = input()
	g = []
	for j in k:
		if ord(j) in g:
			ans = -1
			break
		g.append(ord(j))
	if ans == -1:
		print('No')
	else:
		g.sort()
		n = len(g)
		if g[n - 1] - g[0] == n - 1:
			print('Yes')
		else:
			print('No')


n = int(input())
for i in range(n):
	s = list(input())
	s = sorted(s)
	if len(set(s)) != len(s):
		print('No')
		continue
	elif len(s) == 1:
		print('Yes')
	else:
		q = ord(s[0])
		for j in range(1, len(s)):
			if ord(s[j]) != q + 1:
				print('No')
				break
			q += 1
		else:
			print('Yes')


n = int(input())
for i in range(n):
	s = list(input())
	t = list(map(ord, s))
	t.sort()
	f = 0
	for i in range(len(t) - 1):
		if t[i] != t[i + 1] - 1:
			f = 1
			break
		else:
			f = 0
	if f == 0:
		print('YES')
	else:
		print('no')


n = int(input())

def get(string):
	T = []
	for st in string:
		T.append(ord(st))
	T.sort()
	temp = T[0]
	for t in T[1:]:
		if t != temp + 1:
			return 'No'
		temp = t
	return 'Yes'
Ans = []
for _ in range(n):
	Ans.append(get(input()))
print(*Ans, sep='\n')


al = 'abcdefghijklmnopqrstuvwxyz'
x = int(input())
for k in range(x):
	a = input()
	a = ''.join(sorted(a))
	if a in al:
		print('yes')
	else:
		print('no')


t = int(input())
for i in range(t):
	x = list(map(str, input()))
	s = ''.join(sorted(x))
	y = 'abcdefghijklmnopqrstuvwxyz'
	if s in y:
		print('Yes')
	else:
		print('No')


from bisect import bisect_right as br
from bisect import bisect_left as bl
from collections import *
from itertools import *
import functools
import sys
import math
import random
MAX = sys.maxsize
MAXN = 10 ** 5 + 10
MOD = 10 ** 9 + 7

def isprime(n):
	n = abs(int(n))
	if n < 2:
		return False
	if n == 2:
		return True
	if not n & 1:
		return False
	for x in range(3, int(n ** 0.5) + 1, 2):
		if n % x == 0:
			return False
	return True

def mhd(a, b, x, y):
	return abs(a - x) + abs(b - y)

def numIN(x=' '):
	return map(int, sys.stdin.readline().strip().split(x))

def charIN():
	return sys.stdin.readline().strip().split()

def dis(x, y):
	a = y[0] - x[0]
	b = x[1] - y[1]
	return (a * a + b * b) ** 0.5
for _ in range(int(input())):
	s = input()
	l = sorted(s)
	d = defaultdict(int)
	f = 1
	for i in l:
		d[i] += 1
		if d[i] > 1:
			f = 0
			break
	if f:
		f1 = 1
		for i in range(len(s) - 1):
			if ord(l[i + 1]) - ord(l[i]) != 1:
				print('No')
				f1 = 0
				break
		if f1:
			print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	if s[-1] == '\n':
		s = s[:-1]
	s = ''.join(sorted(s))
	for j in range(1, len(s)):
		if ord(s[j]) != ord(s[j - 1]) + 1:
			print('No\n')
			break
	else:
		print('Yes\n')


n = int(input())
for _ in range(0, n):
	ss = input()
	if len(list(ss)) == len(list(set(ss))):
		k = sorted(list(ss))
		kk = 'Yes'
		for i in range(1, len(ss)):
			if ord(k[i]) - ord(k[i - 1]) != 1:
				kk = 'No'
				break
			else:
				pass
		print(kk)
	else:
		print('No')


n = int(input())
for _ in range(n):
	s = input()
	l = len(s)
	temp = []
	for i in s:
		temp.append(ord(i))
	maxx = max(temp)
	minn = min(temp)
	if maxx - minn + 1 != l:
		print('No')
	else:
		t = set(temp)
		if len(t) == l:
			print('Yes')
		else:
			print('No')


for i in range(int(input())):
	s = list(input())
	s.sort()
	flag = 0
	prev = s[0]
	for c in s[1:]:
		if ord(prev) + 1 == ord(c):
			prev = c
		else:
			flag = 1
			break
	if flag == 0:
		print('Yes')
	else:
		print('No')


def check(s):
	s = sorted(s)
	for i in range(1, len(s)):
		if ord(s[i]) - ord(s[i - 1]) != 1:
			return 'No'
	return 'Yes'
n = int(input())
for i in range(n):
	print(check(input()))


for _ in range(int(input())):
	s = list(input())
	flag = 1
	s.sort()
	if len(s) == 1:
		print('Yes')
	else:
		onc = 1
		d = {}
		for i in s:
			if i in d:
				onc = 0
			else:
				d[i] = 1
		if onc:
			for i in range(1, len(s)):
				if ord(s[i]) - ord(s[i - 1]) != 1:
					flag = 0
					break
			if flag:
				print('Yes')
			else:
				print('No')
		else:
			print('No')


t = int(input())
for z in range(t):
	s = input()
	a = []
	n = len(s)
	for i in range(n):
		a.append(ord(s[i]))
	a.sort()
	fl = 0
	for i in range(n - 1):
		if a[i + 1] - a[i] != 1:
			fl = 1
			break
	if fl == 0:
		print('Yes')
	else:
		print('No')


def check(s):
	if len(s) == 1:
		return 'Yes'
	s = list(s)
	s.sort()
	for el in range(len(s) - 1):
		if ord(s[el + 1]) - ord(s[el]) != 1:
			return 'No'
	return 'Yes'
n = int(input())
for i in range(n):
	print(check(input()))


R = lambda : map(int, input().split())
for _ in range(int(input())):
	s = [i for i in input()]
	le = len(s)
	f = [0] * 26
	for i in s:
		f[ord(i) - 97] += 1
	flag = 0
	i = 0
	while i < 26:
		if f[i] == 1:
			break
		i += 1
	j = i + 1
	while j < 26:
		if f[j] == 0:
			break
		elif f[j] > 1:
			flag = 1
			break
		j += 1
	if flag:
		print('No')
	elif j - i == le:
		print('Yes')
	else:
		print('No')


from collections import Counter
n = int(input())
abc = 'abcdefghijklmnopqrstuvwxyz'
labc = list(abc)
for _ in range(n):
	res = list(input())
	a = max(res)
	ap = labc.index(a)
	b = min(res)
	bp = labc.index(b)
	flag = True
	cnt = Counter(res)
	for c in cnt.values():
		if c >= 2:
			flag = False
			break
	if flag:
		for i in range(bp, ap + 1):
			if labc[i] in res:
				flag = True
			else:
				flag = False
				break
	if flag:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	s = input()
	if len(set(s)) != len(s):
		print('No')
	else:
		ord_list = list(map(ord, s))
		ord_list = sorted(ord_list)
		mark = True
		for i in range(len(ord_list) - 1):
			if ord_list[i] != ord_list[i + 1] - 1:
				mark = False
				break
		if mark:
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	l = list(input())
	if len(l) != len(set(l)):
		print('No')
	elif len(l) == 1:
		print('Yes')
	else:
		s = []
		f = True
		for i in range(len(l)):
			s.append(ord(l[i]))
		s.sort()
		for j in range(len(s) - 1):
			if s[j + 1] - s[j] != 1:
				print('No')
				f = False
				break
		if f:
			print('Yes')


n = int(input())
for i in range(n):
	s = input()
	k = True
	s = sorted(list(s))
	for i in range(len(s) - 1):
		if ord(s[i]) + 1 != ord(s[i + 1]):
			k = False
	print('YES' if k else 'NO')


from math import sqrt, ceil, floor
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
import string

def c(s):
	new = ''.join(sorted(s))
	al = string.ascii_lowercase
	if not new in al:
		stdout.write('No\n')
	else:
		stdout.write('Yes\n')
n = int(stdin.readline())
for i in range(n):
	s = stdin.readline()
	c(s[:-1])


for i in range(int(input())):
	x = list(input())
	print('NO' if ord(max(x)) - ord(min(x)) + 1 != len(x) or len(x) != len(set(x)) else 'YES')


import string
n = int(input())

def m():
	S = []
	for i in range(n):
		a = input()
		S.append(a)
	ans = []
	alf_dict = {}
	for c in string.ascii_lowercase:
		alf_dict[c] = 0

	def solve(s):
		d = alf_dict.copy()
		for c in s:
			if d.get(c, 0) == 0:
				d[c] = 1
			else:
				return 'No'
		tmp = list(d.items())
		tmp.sort(key=lambda x: x[0])
		alf = [k for (k, v) in tmp]
		val = [v for (k, v) in tmp]
		r = l = 0
		for i in range(len(val)):
			if val[i] != 0:
				l = i
				break
		for i in reversed(range(len(val))):
			if val[i] != 0:
				r = i
				break
		result = val[l:r + 1]
		if 0 in result:
			return 'No'
		return 'Yes'
	for s in S:
		ans.append(solve(s))
	for x in ans:
		print(x)
m()


import sys
input = sys.stdin.readline
n = int(input())
for i in range(n):
	alph = ''
	s = sorted([ord(c) for c in input().strip('\n')])
	ans = True
	for _ in range(1, len(s)):
		if s[_] - 1 == s[_ - 1]:
			continue
		ans = False
		break
	if ans:
		print('Yes\n')
	else:
		print('No\n')


def isAdjacent(l):
	for i in range(len(l) - 1):
		if ord(l[i + 1]) - ord(l[i]) != 1:
			return False
	return True
n = int(input())
for _ in range(n):
	s = list(input())
	s.sort()
	if isAdjacent(s):
		print('Yes')
	else:
		print('No')


def diverse(list):
	(z, i) = (True, 0)
	while i < len(list) and z:
		if i == 0:
			pass
		elif list[i] == list[i - 1] + 1:
			pass
		else:
			z = False
		i += 1
	return z

def make_list(s):
	l = []
	for i in range(len(s)):
		l.append(ord(s[i]))
	l.sort()
	return l
n = int(input())
for i in range(n):
	l = make_list(input())
	if diverse(l):
		print('Yes')
	else:
		print('No')


n = int(input())
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	s = input()
	s = ''.join(sorted(s))
	if s in alphabet:
		print('YeS')
	else:
		print('nO')


n = int(input())
for i in range(n):
	s = input()
	l = []
	for j in s:
		l.append(j)
	l.sort()
	c = 0
	for j in range(0, len(l) - 1, 1):
		if ord(l[j + 1]) - ord(l[j]) != 1:
			c = c + 1
			break
	if c == 1:
		print('No')
	else:
		print('Yes')


t = int(input())
for j in range(t):
	s = input()
	flag = 0
	if len(s) == 1:
		print('YES')
	else:
		l = list()
		for i in range(len(s)):
			l.append(s[i])
		l.sort()
		for i in range(len(l) - 1):
			a = ord(l[i])
			b = ord(l[i + 1]) - 1
			if a != b:
				print('NO')
				flag = 1
				break
		if flag == 0:
			print('YES')


t = int(input())
while t > 0:
	t -= 1
	s = list(input())
	l = len(s)
	if l > 26:
		print('No')
	else:
		f = 0
		a = [0 for i in range(26)]
		for i in s:
			a[ord(i) - 97] += 1
		for i in range(26):
			if i + l <= 26:
				if a[i:i + l].count(1) == l:
					print('Yes')
					f = 1
					break
		if f == 0:
			print('No')


d = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10, 'k': 11, 'l': 12, 'm': 13, 'n': 14, 'o': 15, 'p': 16, 'q': 17, 'r': 18, 's': 19, 't': 20, 'u': 21, 'v': 22, 'w': 23, 'x': 24, 'y': 25, 'z': 26}
n = int(input())
z = []
for i in range(n):
	x = input()
	y = len(x)
	x = list(set(x))
	x.sort()
	if y != len(x):
		z.append('NO')
		continue
	if d[x[len(x) - 1]] - d[x[0]] == y - 1:
		z.append('YES')
	else:
		z.append('NO')
for i in range(n):
	print(z[i])


def main():
	n = int(input())
	for i in range(n):
		print(isDiverse(sorted(input())))

def isDiverse(text):
	previous = text[0]
	ocurred = []
	for i in text:
		if ord(i) - ord(previous) > 1 or i in ocurred:
			return 'No'
		else:
			previous = i
			ocurred.append(i)
	return 'Yes'
main()


k = int(input())
for i in range(k):
	l = 0
	h = 0
	st = input()
	a = [False] * 26
	if len(st) > 26:
		print('NO')
	else:
		for j in st:
			if not a[ord(j) - 97]:
				a[ord(j) - 97] = True
			elif a[ord(j) - 97]:
				print('NO')
				l = 1
				break
		if l == 0:
			k = 0
			for j in a:
				if j:
					h += 1
				elif not j and h != 0:
					if h == len(st):
						print('YES')
					else:
						print('NO')
					k = 1
					break
			if k == 0:
				if h == len(st):
					print('YES')
				else:
					print('NO')


t = int(input())
for i in range(0, t):
	s = input()
	s = s.lower()
	flag = True
	count = [0] * 26
	if len(s) == 0 or len(s) > 26:
		print('No')
	else:
		for j in range(0, len(s), 1):
			if count[ord(s[j]) - ord('a')] == 0:
				count[ord(s[j]) - ord('a')] += 1
			else:
				flag = False
				break
		setflag = False
		if flag is True:
			for j in range(0, 26, 1):
				if count[j] == 0 and j != 0 and (count[j - 1] == 1):
					setflag = True
				if setflag is True:
					if count[j] == 1:
						flag = False
						break
		if flag == True:
			print('Yes')
		else:
			print('No')


n = int(input())
for i in range(n):
	s = input()
	seq = True
	if len(s) != len(set(s)):
		print('No')
		continue
	f = sorted(s)
	for i in range(1, len(f)):
		if ord(f[i]) != ord(f[i - 1]) + 1:
			seq = False
	if seq:
		print('Yes')
	else:
		print('No')


def check(s):
	x = list(map(ord, sorted(s)))
	p = len(x)
	for i in range(p - 1):
		if not x[i + 1] - x[i] == 1:
			return 'NO'
	return 'YES'
n = int(input())
for i in range(n):
	l = input()
	print(check(l))


for _ in range(int(input())):
	s = sorted(input())
	l = len(s)
	k = 0
	if len(set(s)) != l:
		print('NO')
		continue
	for i in range(1, l):
		a = ord(s[i]) - ord(s[0])
		if a > l - 1:
			k = 1
			break
	if k == 1:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	a = list(input())
	k = 0
	a.sort()
	for j in range(len(a) - 1):
		if ord(a[j]) - ord(a[j + 1]) != -1:
			k = 1
			break
	if k == 1:
		print('No')
	else:
		print('Yes')


from string import ascii_lowercase
n = int(input())
s = ascii_lowercase
for i in range(n):
	b = input()
	e = set()
	for j in b:
		e.add(j)
	flag = True
	x = sorted(list(e))
	r = ''
	for j in x:
		r += j
	if r in s and len(e) == len(b):
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	x = list(input())
	x.sort()
	if len(set(x)) != len(x) or ord(x[-1]) - ord(x[0]) + 1 != len(x):
		print('No')
	elif ord(x[-1]) - ord(x[0]) + 1 == len(x):
		print('Yes')


i = input
exec(int(i()) * "a=sorted(map(ord,i()));print('YNEOS'[any(y!=x+1 for x,y in zip(a,a[1:]))::2]);")


n = int(input())
outputs = ''
for i in range(n):
	word = input()
	if len(word) == 1:
		outputs += 'Yes\n'
		continue
	letters = []
	count = 0
	for i in word:
		letters.append(ord(i))
	letters.sort()
	for i in range(len(letters) - 1):
		if letters[i + 1] - letters[i] == 1:
			count += 1
	if count == len(word) - 1:
		outputs += 'Yes\n'
	else:
		outputs += 'No\n'
print(outputs[:-1])


n = int(input())
letters = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	a = input()
	if ''.join(sorted(a)) in letters:
		print('Yes')
	else:
		print('No')


n = int(input())
for k in range(n):
	s = input()
	if len(s) == 1:
		print('Yes')
	elif len(set(s)) < len(s):
		print('No')
	else:
		a = sorted(s)
		flag = 0
		for i in range(len(a) - 1):
			if ord(a[i + 1]) - ord(a[i]) > 1:
				flag = 1
				break
		if flag == 1:
			print('No')
		else:
			print('Yes')


n = int(input())
alfa = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	a = sorted(list(input()))
	print('Yes' if alfa.index(a[-1]) - alfa.index(a[0]) + 1 == len(set(a)) and len(a) == len(set(a)) else 'No')


num = int(input())
Strings = list()
for i in range(num):
	str = input()
	Strings.append(str)
for i in Strings:
	j = 0
	str = [j for j in i]
	str.sort()
	flag = True
	for j in range(len(str) - 1):
		if ord(str[j]) != ord(str[j + 1]) - 1:
			flag = False
	if flag == True:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	l = list(input())
	l.sort()
	L = len(l)
	ans = 'YES'
	for i in range(L - 1):
		if ord(l[i + 1]) - ord(l[i]) != 1:
			ans = 'NO'
	print(ans)


def is_unique(strr):

	def _contains(string, char):
		for c in string:
			if c == char:
				return True
		return False
	for index in range(len(strr)):
		if _contains(strr[:index], strr[index]):
			return False
	return True
num = int(input())
for i in range(num):
	string = input()
	validationList = []
	for j in range(len(string)):
		validationList.append(ord(string[j]))
	validationList.sort()
	if len(string) == 1:
		print('Yes')
		continue
	if validationList[0] + len(string) - 1 != validationList[-1]:
		validation = False
	else:
		validation = True
	if is_unique(string) and validation:
		print('Yes')
	else:
		print('No')


num = int(input())
inputs = []
for i in range(num):
	raw = input()
	inputs = [item for item in raw]
	inputs.sort()
	found = True
	for i in range(len(inputs) - 1):
		if ord(inputs[i + 1]) - ord(inputs[i]) != 1:
			found = False
			break
	if found:
		print('Yes')
	else:
		print('No')


b = int(input())
for j in range(b):
	a = input()
	k = True
	A = set()
	i = 1
	q = ord(a[0])
	c = q
	A.add(q)
	while i < len(a) and k == True:
		if ord(a[i]) not in A:
			A.add(ord(a[i]))
			if ord(a[i]) < q:
				q = ord(a[i])
			i += 1
		else:
			k = False
	if k == True:
		A = list(A)
		x = (q * 2 + len(a) - 1) * len(a) // 2
		if x == sum(A):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = int(input())
result = []
for i in range(n):
	string = input()
	app = []
	for j in string:
		app.append(ord(j))
	app.sort()
	st = True
	for t in range(len(app) - 1):
		if app[t] == app[t + 1] - 1:
			continue
		else:
			st = False
			result.append('No')
			break
	if st:
		result.append('Yes')
for i in result:
	print(i)


n = int(input())
for i in range(n):
	s = input()
	a = []
	for j in s:
		a.append(ord(j))
	a.sort()
	ans = True
	for j in range(1, len(a)):
		if a[j - 1] + 1 != a[j]:
			ans = False
	if ans:
		print('YES')
	else:
		print('NO')


d = 0
for x in range(int(input())):
	a = list(input())
	a.sort()
	if len(a) > 1:
		for i in range(len(a) - 1, 0, -1):
			if ord(a[i]) - ord(a[i - 1]) == 1:
				d = 1
			else:
				d = 0
				break
		if d == 0:
			print('No')
		else:
			print('Yes')
	else:
		print('Yes')


n = int(input())
words = []

def check(n):
	for i in range(1, len(ee)):
		if ord(ee[i]) - ord(ee[i - 1]) != 1:
			print('NO')
			return
	print('YES')
	return
for i in range(n):
	words += [input()]
for e in words:
	if len(e) == 1:
		print('YES')
		continue
	ee = sorted(e)
	check(ee)


for _ in range(int(input())):
	n = input()
	ar = []
	count = 0
	for i in n:
		if i in ar:
			count = 1
			break
		else:
			ar.append(ord(i))
	ar = sorted(ar)
	if count == 0:
		for i in range(len(ar) - 1):
			if ar[i] + 1 == ar[i + 1]:
				count = 0
			else:
				count = 1
				break
	if count == 1:
		print('NO')
	else:
		print('YES')


import string

def main(inp):
	o = ord(inp[0])
	isDiverse = True
	if len(inp) == 1:
		return True
	for i in range(1, len(inp)):
		if o + 1 != ord(inp[i]):
			isDiverse = False
			return isDiverse
		o = ord(inp[i])
	return isDiverse
a = input()
for i in range(int(a)):
	s = list(input())
	se = set(s)
	if len(se) == len(s):
		if main(sorted(s)):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


t = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
n = int(input())
for i in range(0, n):
	s = input()
	flag = 1
	a = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, 'g': 0, 'h': 0, 'i': 0, 'j': 0, 'k': 0, 'l': 0, 'm': 0, 'n': 0, 'o': 0, 'p': 0, 'q': 0, 'r': 0, 's': 0, 't': 0, 'u': 0, 'v': 0, 'w': 0, 'x': 0, 'y': 0, 'z': 0}
	cnt = 0
	for j in s:
		if a[j] == 1:
			flag = 0
		else:
			a[j] = 1
			cnt += 1
	flag1 = 0
	flag2 = 0
	for j in t:
		if a[j] == 1 and flag2 == 0:
			flag2 = 1
			flag1 = 1
		elif a[j] == 1 and flag2 == 1:
			flag1 += 1
		elif a[j] == 0 and flag2 == 1:
			flag2 = 2
	if flag1 != cnt:
		flag = 0
	if flag == 1:
		print('Yes')
	else:
		print('No')


q = int(input())
for _ in range(q):
	s = input()
	l = list(s)
	l.sort()
	can = True
	for i in range(1, len(l)):
		if l[i - 1] == l[i]:
			can = False
			break
		if ord(l[i - 1]) + 1 != ord(l[i]):
			can = False
			break
	print('Yes' if can else 'No')


def diverse_string(x):
	x = str(x)
	lx = len(x)
	if lx == 1:
		return 'Yes'
	y = sorted(x)
	y = list(dict.fromkeys(y))
	n = len(y) - 1
	k = int(ord(y[n])) - int(ord(y[0])) + 1
	if lx != len(y):
		return 'No'
	if lx == len(y) == k:
		return 'Yes'
	else:
		return 'No'

def main():
	number = int(input())
	d = []
	for i in range(0, number):
		string = input()
		d.append(string)
		del string
	ans = ''
	for i in range(number):
		ans = ans + '\n' + str(diverse_string(d[i]))
	print(ans)
main()


alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
str2 = alphabet
n = int(input())
for _ in range(n):
	str1 = list(input())
	str1.sort()
	flag = 1
	for i in range(len(str1) - 1):
		if str1[i] == str1[i + 1]:
			flag = 0
			break
	if flag == 1:
		for i in range(len(str1) - 1):
			if str1[i + 1] != alphabet[alphabet.index(str1[i]) + 1]:
				flag = 0
				break
	if flag == 1:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	a = list(input())
	a.sort()
	f = 1
	for i in range(len(a)):
		if i > 0 and ord(a[i]) - ord(a[i - 1]) != 1:
			f = 0
			print('No')
			break
	if f:
		print('Yes')


k = int(input())
for i in range(k):
	s = input()
	t = []
	for c in s:
		t.append(c)
	t.sort()
	f = True
	for i in range(len(t) - 1):
		if ord(t[i + 1]) - ord(t[i]) != 1:
			f = False
	if f:
		print('YES')
	else:
		print('NO')


n = input()
n = int(n)
for i in range(n):
	d = input()
	f = []
	for i in range(len(d)):
		f += d[i]
	f.sort()
	a = 1
	for i in range(len(f) - 1):
		x = chr(ord(f[i]) + 1)
		if x == f[i + 1]:
			continue
		else:
			a = 0
	if a == 0:
		print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	fl = 1
	text = sorted(list(map(ord, list(input()))))
	for i in range(len(text) - 1):
		if text[i + 1] - text[i] != 1:
			print('No')
			fl = 0
			break
	if fl:
		print('Yes')


n = int(input())
d = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10, 'k': 11, 'l': 12, 'm': 13, 'n': 14, 'o': 15, 'p': 16, 'q': 17, 'r': 18, 's': 19, 't': 20, 'u': 21, 'v': 22, 'w': 23, 'x': 24, 'y': 25, 'z': 26}
for _ in range(n):
	s = input()
	s = sorted(s)
	if len(set(s)) != len(s):
		print('No')
	else:
		h = d[s[0]]
		tag = True
		for i in s[1:]:
			if d[i] != h + 1:
				tag = False
				print('No')
				break
			else:
				h += 1
		if tag:
			print('Yes')


def solve():
	s = sorted(input())
	for i in range(1, len(s)):
		if ord(s[i]) - ord(s[i - 1]) != 1:
			return False
	return True
for _ in range(int(input())):
	print('NYoe s'[solve()::2])


t = int(input())
for _ in range(t):
	s = input()
	s = sorted(s)
	for i in range(len(s) - 1):
		if ord(s[i]) - 96 + 1 != ord(s[i + 1]) - 96:
			print('NO')
			break
	else:
		print('YES')


a = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
for i in range(n):
	s = input()
	s = sorted(s)
	ans = ''.join(s)
	if ans in a:
		print('Yes')
	else:
		print('No')


n = int(input())
L = []
for i in range(n):
	L.append(input())
for i in L:
	i = ''.join(sorted(i))
	x = True
	for j in range(len(i) - 1):
		if ord(i[j + 1]) - ord(i[j]) != 1:
			x = False
	if x:
		print('YES')
	else:
		print('NO')


n = int(input())
L = [input() for i in range(n)]
for st in L:
	d = True
	s = [c for c in st]
	s.sort()
	for j in range(1, len(s)):
		if ord(s[j]) - ord(s[j - 1]) != 1:
			d = False
	print('Yes' if d else 'No')


def solve(st):
	a = [0] * 26
	x = ord(st[0])
	for i in range(0, len(st)):
		a[ord(st[i]) - ord('a')] += 1
	start = 0
	for i in range(26):
		if a[i] > 0:
			start = i
			break
	end = 26
	for i in range(start, 26):
		if a[i] != 1:
			end = i
			break
	for i in range(start, min(end, 26)):
		if a[i] != 1:
			return False
	for i in range(end, 26):
		if a[i] > 0:
			return False
	return True
n = int(input())
for i in range(n):
	st = input()
	if solve(st):
		print('Yes')
	else:
		print('No')


from sys import stdin
n = input()
for line in stdin:
	s = sorted(line.strip())
	cur = s[0]
	ok = True
	for ch in s:
		if cur != ch:
			ok = False
			break
		cur = chr(ord(cur) + 1)
	if ok:
		print('Yes')
	else:
		print('No')


def is_diverse(string):
	if len(string) == 1:
		return 'Yes'
	string = sorted(string)
	for i in range(len(string) - 1):
		if not ord(string[i]) == ord(string[i + 1]) - 1:
			return 'No'
	return 'Yes'
n = int(input())
for i in range(n):
	string = input()
	print(is_diverse(string))


t = int(input())
for _ in range(t):
	s = input()
	if len(set(s)) != len(s):
		print('No')
		continue
	seg = []
	for i in s:
		seg.append(ord(i) - 97)
	seg.sort()
	flag = 0
	for i in range(0, len(seg) - 1):
		if seg[i + 1] - seg[i] == 1:
			continue
		else:
			flag = 1
	print('Yes' if not flag else 'No')


n = int(input())
a = []
for i in range(n):
	s = ''.join(sorted(input()))
	m = ''
	for j in range(len(s)):
		if ord(s[j]) - ord(min(s)) != j:
			m = 'No'
			break
	if ord(max(s)) - ord(min(s)) + 1 == len(s) and m == '':
		m = 'Yes'
	else:
		m = 'No'
	a.append(m)
for i in range(n):
	print(a[i])


n = int(input())
for i in range(n):
	flag = True
	s = input()
	l = list(s)
	l.sort()
	s = ''.join(l)
	for i in range(len(s) - 1):
		if ord(s[i + 1]) - ord(s[i]) != 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	s = list(input())
	t = sorted(s)
	flag = 'Yes'
	for j in range(1, len(s)):
		if ord(t[j]) != ord(t[j - 1]) + 1:
			flag = 'No'
			break
	print(flag)


for _ in range(int(input())):
	s = input()
	l = []
	res = 1
	for i in s:
		l.append(ord(i))
	l.sort()
	if len(s) == 1:
		print('yes')
		continue
	for i in range(1, len(l)):
		if l[i] != l[i - 1] + 1:
			print('no')
			res = 0
			break
	if res == 1:
		print('yes')


n = int(input())
l = []
for i in range(n):
	o = input()
	l.append(o)
f = '0abcdefghijklmnopqrstuvwxyz'
for i in l:
	a = len(i)
	if a != len(set(i)):
		print('No')
	else:
		r = list(i)
		r.sort()
		p = f.index(r[0])
		s = f.index(r[-1])
		m = sum([f.index(t) for t in r])
		if m == 1 / 2 * (a - 1 + 2 * p) * a:
			print('Yes')
		else:
			print('No')


amount = int(input())
for i in range(amount):
	counter = [0] * 27
	string = input()
	flag = False
	for i in range(len(string)):
		counter[ord(string[i]) - ord('a')] += 1
	if max(counter) > 1:
		print('No')
		continue
	new_str = sorted(string)
	for i in range(1, len(new_str)):
		if ord(new_str[i]) - ord('a') - (ord(new_str[i - 1]) - ord('a')) > 1:
			print('No')
			flag = True
			break
	if flag:
		continue
	print('Yes')


def f(n, arr):
	for a in arr:
		l = list(map(ord, a))
		l.sort()
		result = 'Yes'
		for i in range(1, len(l)):
			if l[i] - l[i - 1] != 1:
				result = 'No'
				break
		print(result)
n = int(input())
arr = []
for i in range(n):
	arr.append(input())
f(n, arr)


n = int(input())
for i in range(n):
	b = 0
	string = input()
	string = sorted(string)
	for j in range(0, len(string) - 1):
		if ord(string[j + 1]) != ord(string[j]) + 1:
			print('No')
			b = 1
			break
	if b == 0:
		print('Yes')


t = int(input())
for i in range(t):
	s = str(input())
	t = ''.join(sorted(s))
	if len(t) == 1:
		print('Yes')
	else:
		flag = 0
		for i in range(1, len(t)):
			if ord(t[i]) - ord(t[i - 1]) != 1:
				print('No')
				flag = 1
				break
		if flag == 0:
			print('Yes')


import sys
import math
alpha = 'abcdefghijklmnopqrstuvwxyz'

def main():
	n = int(sys.stdin.readline().strip())
	for _ in range(n):
		letter = list(sys.stdin.readline().strip())
		letter.sort()
		s = ''.join(letter)
		if s in alpha:
			print('Yes')
		else:
			print('No')
main()


t = int(input())
for _ in range(t):
	s = input()
	s = sorted(s)
	l = len(s)
	f = 0
	for i in range(l - 1):
		if ord(s[i]) - ord(s[i + 1]) == -1:
			f += 1
			continue
		else:
			print('No')
			break
	if f == l - 1:
		print('Yes')


n = int(input())
alphavite = list('abcdefghijklmnopqrstuvwxyz')
for i in range(n):
	flag = True
	vvod = str(input())
	mas = sorted(list(vvod))
	mnosh = set(vvod)
	if len(mas) == len(mnosh):
		pos = alphavite.index(mas[0])
		for j in range(pos, len(mas) + pos):
			if alphavite[j] != mas[j - pos]:
				print('No')
				flag = False
				break
		if flag:
			print('Yes')
	else:
		print('No')


n = int(input())
output = []
state = ''
for a in range(n):
	string = input()
	if len(string) == 1:
		state = 'Yes'
	if state != 'Yes':
		for b in string:
			if string.count(b) > 1:
				state = 'No'
				break
	if state != 'No':
		stringList = [c for c in string]
		stringList.sort()
		pos = 0
		for c in stringList[:-1]:
			if ord(c) - ord(stringList[pos + 1]) != -1:
				state = 'No'
				break
			pos += 1
	if state in ['', 'Yes']:
		output.append('Yes')
	else:
		output.append('No')
	state = ''
for a in output:
	print(a)


import sys
from collections import defaultdict
strInp = lambda : input().strip().split()
intInp = lambda : list(map(int, strInp()))
ord
n = int(input())
for _ in range(n):
	s = list(input())
	s.sort(reverse=True)
	first = ord(s[0])
	all = True
	for i in s[1:]:
		first -= 1
		if ord(i) != first:
			all = False
			break
	if all:
		print('Yes')
	else:
		print('No')


n = int(input())
a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for t in range(n):
	s = input()
	flag = 0
	c = 0
	for i in a:
		if i in s:
			flag = 1
			c += 1
		if flag == 1 and i not in s:
			break
	if c == len(s):
		print('yes')
	else:
		print('no')


n = int(input())
for i in range(n):
	s = input()
	s1 = sorted(s)
	c = 0
	for i in range(len(s1) - 1):
		if abs(ord(s1[i]) - ord(s1[i + 1])) != 1:
			c = 1
			break
	if c == 0:
		print('Yes')
	else:
		print('No')


alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for test_case in range(int(input())):
	string = sorted(input())
	temp = alphabet[alphabet.index(string[0]):alphabet.index(string[0]) + len(string)]
	if string == temp:
		print('YES')
	else:
		print('NO')


t = int(input())
for ab in range(t):
	k = sorted(input())
	ll = True
	for ab in range(1, len(k)):
		if ord(k[ab]) - ord(k[ab - 1]) != 1:
			print('NO')
			ll = False
			break
	if ll:
		print('YES')


import string
a = string.ascii_lowercase
for _ in range(int(input())):
	s = ''.join(map(str, sorted(input())))
	print('YES' if s in a else 'NO')


import sys, os
from io import BytesIO, IOBase
import collections, itertools, bisect, heapq, math, string
from decimal import *
BUFSIZE = 8192
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def main():
	t = int(input())
	for i in range(t):
		s = str(input())
		d = collections.Counter(s)
		sd = sorted(d.items(), key=lambda x: x[1])
		if len(s) > 26 or sd[-1][1] > 1:
			print('No')
			continue
		f = True
		ss = sorted(s)
		for j in range(1, len(ss)):
			if ord(ss[j]) != ord(ss[j - 1]) + 1:
				f = False
				break
		if f:
			print('Yes')
		else:
			print('No')
main()


letters = []
n = int(input())
for i in range(n):
	letters.append(input())
result = []
for letter in letters:
	if len(letter) == 1:
		result.append('Yes')
		continue
	letter = [ord(i) for i in letter]
	letter.sort()
	for i in range(len(letter) - 1):
		if letter.count(letter[i]) != 1:
			result.append('No')
			break
		if letter[i] != letter[i + 1] - 1:
			result.append('No')
			break
		if i == len(letter) - 2:
			result.append('Yes')
for i in result:
	print(i)


n = int(input())
for i in range(n):
	alphabet = [0] * 26
	q = [int(ord(x) - 97) for x in input()]
	minV = 27
	maxV = -1
	flag = 0
	for l in q:
		if alphabet[l]:
			print('No')
			flag = 1
			break
		alphabet[l] = 1
		if l < minV:
			minV = l
		if l > maxV:
			maxV = l
	if not flag:
		if maxV - minV == len(q) - 1:
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	s = input().strip()
	l = 'abcdefghijklmnopqrstuvwxyz'
	s = ''.join(sorted(s))
	if s in l:
		print('Yes')
	else:
		print('No')


n = int(input())
alpha = 'abcdefghijklmnopqrstuvwxyz'
answer = []
for i in range(n):
	s = input()
	buff = list(s)
	buff.sort()
	s = ''.join(buff)
	answer.append('YES') if s in alpha else answer.append('NO')
for item in answer:
	print(item)


from string import ascii_lowercase
alp = list(ascii_lowercase)

def func():
	arr = list(input())
	arr.sort()
	start = alp.index(arr[0])
	for i in range(1, len(arr)):
		if alp.index(arr[i]) != start + i:
			print('No')
			return 0
	print('Yes')
n = int(input())
for i in range(n):
	func()


t = int(input())
while t > 0:
	n = input()
	l = sorted(n)
	x = []
	j = ord(l[0])
	flag = 0
	for i in l:
		if j == ord(i):
			con = 1
		else:
			flag = 1
			break
		j = j + 1
	if flag == 0:
		print('Yes')
	else:
		print('No')
	t = t - 1


n = int(input())

def calc(str):
	sortedStr = ''.join(sorted(str))
	for (a, b) in zip(sortedStr[:-1], sortedStr[1:]):
		if ord(a) != ord(b) - 1:
			return 'No'
	return 'Yes'
for i in range(n):
	print(calc(input()))


for TT in range(1, int(input()) + 1):
	s = sorted(input())
	n = len(s)
	res = len(set(s)) == n
	res &= all((abs(ord(s[i]) - ord(s[i + 1])) == 1 for i in range(n - 1)))
	print('Yes' if res else 'No')


amount = int(input())
for _ in range(amount):
	word = input()
	if len(word) != len(set(word)):
		print('No')
	else:
		max_letter = ord(max(word))
		min_letter = ord(min(word))
		if len(word) != max_letter - min_letter + 1:
			print('No')
		else:
			flag = True
			for letter in word:
				if not min_letter <= ord(letter) <= max_letter:
					flag = False
					break
			if flag:
				print('Yes')
			else:
				print('No')


t = int(input())
for _ in range(t):
	a = input()
	if len(a) != len(set(a)):
		print('No')
	else:
		b = sorted(a)
		c = 0
		for i in range(len(b) - 1):
			if ord(b[i]) + 1 == ord(b[i + 1]):
				c = c + 1
		if c == len(a) - 1:
			print('Yes')
		else:
			print('No')


__author__ = 'NIORLYS'
n = int(input())
answer = []
while n:
	s = input()
	s = list(map(ord, list(s)))
	s.sort()
	is_diverse = True
	for i in range(len(s) - 1):
		if s[i + 1] - s[i] != 1:
			is_diverse = False
			break
	answer.append(is_diverse)
	n -= 1
for ans in answer:
	if ans:
		print('Yes')
	else:
		print('No')


n = int(input())
P = [0] * n
for i in range(n):
	a = input()
	if len(a) == 1 and n == 1:
		P[i] = 'YES'
		break
	elif len(a) == 1:
		P[i] = 'YES'
		continue
	b = sorted(a)
	for j in range(len(b) - 1):
		if ord(b[j]) + 1 == ord(b[j + 1]):
			P[i] = 'YES'
		else:
			P[i] = 'NO'
			break
for i in range(n):
	print(P[i])


def isdiverse(s):
	for i in range(1, len(s)):
		if s[i] - s[i - 1] == 1:
			continue
		else:
			return False
	return True
t = int(input())
for _ in range(t):
	s = sorted([ord(i) for i in list(input().rstrip())])
	print('Yes' if isdiverse(s) else 'No')


def partition(arr, low, high):
	i = low - 1
	pivot = arr[high]
	for j in range(low, high):
		if arr[j] <= pivot:
			i = i + 1
			(arr[i], arr[j]) = (arr[j], arr[i])
	(arr[i + 1], arr[high]) = (arr[high], arr[i + 1])
	return i + 1

def quickSort(arr, low, high):
	if low < high:
		pi = partition(arr, low, high)
		quickSort(arr, low, pi - 1)
		quickSort(arr, pi + 1, high)

def IsDiverse(arr):
	n = len(arr)
	if n == 1:
		return 'Yes'
	for i in range(n):
		if i == n - 1:
			return 'Yes'
		if ord(arr[i]) + 1 == ord(arr[i + 1]):
			pass
		else:
			return 'No'
n = int(input())
for i in range(n):
	arr = list(input())
	l = len(arr)
	quickSort(arr, 0, l - 1)
	print(IsDiverse(arr))


n = int(input())
alpha = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(n):
	s = input()
	x = list(s)
	x.sort()
	if ''.join(x) in alpha:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	s = input()
	s = sorted(s)
	f = 0
	for i in range(len(s) - 1):
		if ord(s[i + 1]) - ord(s[i]) != 1:
			f = 1
			print('NO')
			break
	if f == 0:
		print('YES')


alphabet = 'abcdefghijklmnopqrstuvwxyz'
number_of_words = int(input())
list_of_words = []
for word in range(number_of_words):
	word = input()
	list_of_words.append(word)
for word in list_of_words:
	if ''.join(sorted(list(word))) in alphabet:
		print('yes')
	else:
		print('No')


alphabet = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
for i in range(n):
	if ''.join(sorted(list(input()))) in alphabet:
		print('Yes')
	else:
		print('No')


n = int(input())
for _ in range(0, n):
	s = sorted(list(input().rstrip()))
	i = 0
	v = ord(s[i])
	i += 1
	res = 'Yes'
	while i < len(s):
		curr_v = ord(s[i])
		if curr_v - v != 1:
			res = 'No'
			break
		else:
			v = curr_v
			i += 1
	print(res)


n = int(input())
alphabet = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	l = [char for char in input()]
	l.sort()
	s = ''.join(l)
	if s in alphabet:
		print('Yes')
	else:
		print('No')


def ev():
	s = input()
	mn = set(s)
	if len(s) > len(mn):
		print('No')
		return
	ls = list(mn)
	ls.sort()
	for i in range(1, len(ls)):
		if ord(ls[i]) - ord(ls[i - 1]) != 1:
			print('No')
			return
	print('Yes')
	return
n = int(input())
for i in range(n):
	ev()


import sys
inf = float('inf')
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def main():
	from collections import Counter
	for tc in range(int(input())):
		s = list(input().strip())
		s.sort()
		x = Counter(s)
		if len(x) != len(s):
			print('NO')
			continue
		for i in range(len(s)):
			s[i] = ord(s[i])
		flag = 0
		for i in range(1, len(s)):
			if s[i] - 1 != s[i - 1]:
				print('NO')
				flag = 1
				break
		if flag == 0:
			print('YES')
main()


import string
s = int(input())
count = 0
ans = []
ref = list(string.ascii_lowercase)
while count < s:
	n = input()
	x = len(n)
	start = 0
	flag = 0
	if len(set(n)) != len(n):
		ans.append('No')
	else:
		for y in range(len(ref)):
			if ref[y] in n:
				start += y
				break
		for z in range(len(n) - 1):
			start += 1
			if ref[start] not in n:
				flag = 1
				ans.append('No')
				break
		if flag == 0:
			ans.append('Yes')
	count += 1
for t in ans:
	print(t)


t = int(input())
for j in range(t):
	s = input()
	n = len(s)
	d = 0
	c = [s[i] for i in range(len(s))]
	c.sort(reverse=False)
	for i in range(n - 1):
		if ord(c[i]) == ord(c[i + 1]) - 1:
			d = d + 1
	if d == n - 1:
		print('Yes')
	else:
		print('No')


for _ in [0] * int(input()):
	s = sorted(input())
	l = ord(s[0])
	print('YNeos'[s != [*map(chr, range(l, l + len(s)))]::2])


n = int(input())
for i in range(n):
	s = list(input())
	if len(s) == 1:
		print('Yes')
	else:
		s.sort()
		String = 'Yes'
		for i in range(len(s) - 1):
			if ord(s[i + 1]) - ord(s[i]) != 1:
				String = 'No'
				break
		print(String)


def asci(s):
	ls = []
	for i in range(len(s)):
		ls.append(ord(s[i]))
	return sorted(ls)
n = int(input())
for i in range(n):
	s = input()
	ls = asci(s)
	f = 1
	for j in range(0, len(ls) - 1):
		if ls[j + 1] - ls[j] != 1:
			f = 0
			break
	if f == 0:
		print('No')
	elif f == 1:
		print('Yes')


T = int(input())
for i in range(T):
	ls = list(input())
	ls.sort()
	s = ''.join(ls)
	now = ord(s[0])
	for i in s[1:]:
		if ord(i) != now + 1:
			break
		else:
			now += 1
	else:
		print('Yes')
		continue
	print('No')


def main():
	n = int(input())
	for i in range(n):
		diverse = False
		s = list(input())
		s.sort()
		letters = set()
		curr = s[0]
		letters.add(curr)
		for i in range(1, len(s)):
			if s[i] in letters:
				diverse = True
				break
			else:
				letters.add(s[i])
				diff = ord(s[i]) - ord(s[i - 1])
				if diff != 1:
					diverse = True
					break
		if diverse:
			print('No')
		else:
			print('Yes')
main()


from collections import Counter
alphabet = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
lines = []
for i in range(n):
	lines.append(input())

def test(line):
	stop = 0
	for char in alphabet:
		if char in line:
			start = alphabet.index(char)
			break
	for char in alphabet[start + 1:]:
		if char not in line:
			stop = alphabet.index(char)
			break
	if stop == 0:
		stop = 26
	if stop - start == len(line):
		return 'YES'
	else:
		return 'NO'
res = list(map(test, lines))
print('\n'.join(res))


alf = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
for i in range(n):
	string = ''.join(sorted(list(input())))
	if string in alf:
		print('Yes')
	else:
		print('No')


def main():
	n = int(input())
	for i in range(n):
		s = input()
		s = sorted(s)
		s = ''.join(s)
		ans = True
		for i in range(len(s) - 1):
			if ord(s[i + 1]) - ord(s[i]) != 1:
				ans = False
				break
		if ans:
			print('Yes')
		else:
			print('No')
main()


for _ in range(int(input())):
	arr = list(input())
	arr.sort()
	f = True
	for i in range(len(arr) - 1):
		if ord(arr[i + 1]) - ord(arr[i]) != 1:
			print('No')
			f = False
			break
	if f:
		print('Yes')


from sys import stdin
n = int(stdin.readline())
for i in range(n):
	s = input()
	s = sorted(s)
	if ord(s[len(s) - 1]) - ord(s[0]) == len(s) - 1 and len(s) == len(set(s)):
		print('Yes')
	else:
		print('No')


import math
from string import ascii_letters as al

def is_var_str(s):
	s = list(sorted(s))
	met_letters = [False] * len(al)
	prev_i = al.index(s[0])
	met_letters[prev_i] = True
	for l in s[1:]:
		li = al.index(l)
		if met_letters[li]:
			return 'NO'
		met_letters[li] = True
		if li not in (prev_i - 1, prev_i + 1):
			return 'NO'
		prev_i = li
	return 'YES'
n = int(input())
for i in range(n):
	s = input()
	print(is_var_str(s))


def fun(p):
	s = 1
	for i in p:
		if p.count(i) == 1:
			s = s * 1
		else:
			s = s * 0
	if max(p) - min(p) == len(p) - 1 and s == 1:
		return 1
	else:
		return 0
n = int(input())
s = []
for i in range(0, n):
	t = input()
	p = []
	for j in range(0, len(t)):
		p.append(ord(t[j]))
	if fun(p):
		s.append(1)
	else:
		s.append(0)
for i in range(0, n):
	if s[i] == 0:
		print('No')
	else:
		print('Yes')


n = int(input())
m = 0
while m < n:
	string = str(input())
	if len(string) > 26:
		print('no')
	elif len(set(string)) < len(string):
		print('no')
	elif ''.join(sorted(string)) in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
	else:
		print('no')
	m += 1


for i in range(int(input())):
	a = input()
	a = ''.join(sorted(a))
	rty = 0
	for k in range(1, len(a)):
		q = ord(a[k])
		w = ord(a[k - 1])
		if q != w + 1:
			rty = 1
			break
	if rty == 1:
		print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	s = input()
	ist = True
	g = [False for i in range(500)]
	pred = ord(s[0])
	g[ord(s[0])] = True
	for j in range(1, len(s)):
		g[ord(s[j])] = True
		ist = False
	sch = 0
	ist = False
	for j in range(500):
		if g[j] and (not ist):
			sch = 1
			ist = True
		elif not g[j] and ist:
			break
		else:
			sch += 1
	if sch == len(s):
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	s = input()
	a = set()
	for c in s:
		a.add(ord(c))
	f = True
	for i in range(min(a), max(a) + 1):
		if i not in a:
			f = False
			break
	if not f or len(s) != len(a):
		print('No')
	else:
		print('Yes')


def solution(s: str) -> bool:
	s = sorted(s)
	for i in range(0, len(s) - 1):
		if ord(s[i]) != ord(s[i + 1]) - 1:
			return False
	return True
n = int(input())
for i in range(n):
	s = input()
	if solution(s):
		print('yes')
	else:
		print('no')


import string
n = int(input())
letters = string.ascii_lowercase
doubled = {}
for i in range(0, n):
	str = input()
	min_index = len(letters)
	max_index = 0
	flag = True
	doubled = {}
	for l in range(0, len(str)):
		if str[l] in doubled:
			print('No')
			flag = False
			break
		else:
			doubled[str[l]] = 1
			index = letters.index(str[l])
			if index < min_index:
				min_index = index
			if index > max_index:
				max_index = index
	if flag:
		if max_index - min_index + 1 == len(str):
			print('Yes')
		else:
			print('No')


for i in range(int(input())):
	n = input()
	arr = [x for x in n]
	arr.sort()
	flag = 0
	for i in range(len(arr) - 1):
		if ord(arr[i + 1]) - ord(arr[i]) == 1:
			continue
		else:
			flag = 1
	if flag == 0:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	t = 0
	a = []
	for j in s:
		a.append(ord(j))
	a.sort()
	for j in range(len(a) - 1):
		if a[j + 1] - a[j] != 1:
			t = 1
			break
	if t == 0:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	a = list(input())
	a.sort()
	p = 0
	for i in range(len(a) - 1):
		if ord(a[i + 1]) - ord(a[i]) != 1:
			p = 1
			print('No')
			break
	if p == 0:
		print('Yes')


def strok(str):
	alf = 'abcdefghijklmnopqrstuvwxyz'
	mas = []
	for i in range(len(str)):
		mas.append(alf.index(str[i]))
	mas = sorted(mas)
	f = 1
	for i in range(1, len(mas)):
		if mas[i] != mas[i - 1] + 1:
			print('No')
			f = 0
			break
	if f == 1:
		print('Yes')
for i in range(int(input())):
	str = input()
	strok(str)


n = int(input())
for i in range(n):
	s = input()
	s = list(s)
	(ln, flag) = (len(s), 1)
	s.sort()
	for i in range(ln - 1):
		if ord(s[i]) != ord(s[i + 1]) - 1:
			flag = 0
			break
	print(['No', 'Yes'][flag])


t = int(input())
for i in range(t):
	st = input()
	li = [0] * 26
	l = len(st)
	for j in range(l):
		p = ord(st[j])
		if li[p - 97] == 0:
			li[p - 97] = 1
	j = 0
	while li[j] == 0:
		j = j + 1
	k = 25
	while li[k] == 0:
		k = k - 1
	sum = 0
	flag = True
	for x in range(j, k + 1):
		sum = sum + li[x]
		if li[x] == 0:
			flag = False
			break
	if flag and sum == l:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	s = str(input())
	a = [0] * 26
	min_d = 27
	max_d = -1
	yes = True
	for j in range(len(s)):
		a[ord(s[j]) - ord('a')] += 1
		if ord(s[j]) - ord('a') < min_d:
			min_d = ord(s[j]) - ord('a')
		if ord(s[j]) - ord('a') > max_d:
			max_d = ord(s[j]) - ord('a')
	for j in range(min_d, max_d + 1):
		if a[j] == 0 or a[j] > 1:
			yes = False
			break
	if yes:
		print('Yes')
	else:
		print('No')


t = int(input())
for tc in range(t):
	s = list(input())
	s.sort()
	check = True
	for i in range(1, len(s)):
		if ord(s[i]) - ord(s[i - 1]) != 1:
			check = False
			break
	if check:
		print('Yes')
	else:
		print('No')


def check(st):
	st = list(st)
	st.sort()
	for i in range(len(st) - 1):
		if ord(st[i]) != ord(st[i + 1]) - 1:
			return False
	return True
n = int(input())
for i in range(n):
	st = input()
	if check(st):
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = list(input())
	t = list(set(s))
	if len(t) != len(s):
		print('No')
		continue
	s.sort()
	k = 0
	for j in range(1, len(s)):
		if ord(s[j]) - ord(s[j - 1]) != 1:
			k = 1
			break
	if k == 0:
		print('Yes')
	else:
		print('No')


def is_diverse(text):
	chars = []
	for char in text:
		chars.append(char)
	if len(text) != len(set(text)):
		return 'No'
	chars.sort()
	if ord(chars[len(chars) - 1]) - ord(chars[0]) + 1 != len(text):
		return 'No'
	return 'Yes'
n = int(input())
for i in range(n):
	text = input()
	print(is_diverse(text))


t = int(input())
l = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for j in range(t):
	s = input()
	s = sorted(list(s))
	flag = 0
	if len(s) == 1:
		print('YES')
		flag = 1
	elif len(s) == len(set(s)):
		k = 1
		prev = s[0]
		while flag == 0 and k < len(s):
			i = s[k]
			if abs(l.index(prev) - l.index(i)) != 1:
				flag = 1
			k += 1
			prev = i
		if flag == 0:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


n = int(input())
for i in range(n):
	s = str(input())
	count = 26 * [0]
	l = len(s)
	array = []
	for x in s:
		array.append(ord(x) - 97)
	array.sort()
	check = 1
	for x in range(l - 1):
		if array[x] + 1 != array[x + 1]:
			check = 0
			break
	if check == 0:
		print('No')
	else:
		print('Yes')


n = int(input())
for i in range(0, n):
	a = input()
	s = ''.join(sorted(a))
	check = True
	for i in range(0, len(s) - 1):
		if ord(s[i + 1]) != ord(s[i]) + 1:
			check = False
	if check == False:
		print('NO')
	else:
		print('YES')


def xx(s):
	ss = sorted(s)
	i = 0
	for i in range(len(ss) - 1):
		if ord(ss[i]) + 1 == ord(ss[i + 1]):
			pass
		else:
			return 'No'
	if i != len(s) - 1:
		if ss[i] != ss[-1]:
			return 'Yes'
		else:
			return 'No'
	return 'Yes'
n = int(input().strip())
while n != 0:
	n -= 1
	s = input().strip()
	print(xx(s))


t = int(input())
for i in range(t):
	s = input().upper()
	a = []
	for j in range(len(s)):
		a.append(s[j])
	a.sort()
	x = True
	for i in range(len(s) - 1):
		if ord(a[i]) != ord(a[i + 1]) - 1:
			x = False
	for i in range(65, 92):
		if s.count(chr(i)) > 1:
			x = False
	if len(s) == 1:
		x = True
	if x == False:
		print('NO')
	else:
		print('YES')


tests = int(input())
for i in range(tests):
	flag = False
	entrada = str(input())
	ordenado = ''.join(sorted(entrada))
	for j in range(len(entrada) - 1):
		if ord(ordenado[j]) - 97 != ord(ordenado[j + 1]) - 96 and ord(ordenado[j]) - 97 != ord(ordenado[j + 1]) - 98:
			print('No')
			flag = True
			break
	if flag == False:
		print('Yes')


n = int(input())
for i in range(n):
	s = input()
	l = 'abcdefghijklmnopqrstuvwxyz'
	s = sorted(s)
	s = ''.join(s)
	if s in l:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = list(input())
	s1 = s[:]
	s1 = sorted(s1)
	flag = 'Yes'
	for i in range(len(s1) - 1):
		if ord(s1[i]) + 1 == ord(s1[i + 1]):
			pass
		else:
			flag = 'No'
	print(flag)


n = input()
for i in range(int(n)):
	a = input()
	b = set(a)
	if len(b) == len(a):
		b = sorted(a)
		if ord(b[len(b) - 1]) - ord(b[0]) == len(b) - 1:
			print('yes')
		else:
			print('no')
	else:
		print('no')


try:
	t = int(input())
	for i in range(t):
		s = input()
		l = list(s)
		l.sort()
		c = 0
		for i in range(len(l) - 1):
			if abs(ord(l[i]) - ord(l[i + 1])) == 1:
				c += 1
		if c == len(s) - 1:
			print('Yes')
		else:
			print('No')
except EOFError:
	pass


alphabet = 'abcdefghijklmnopqrstuvwxyz'
a0 = int(input())
output = []
for t in range(a0):
	text = input()
	sortedone = ''.join(sorted(text))
	result = 'YES'
	for i in range(len(sortedone) - 1):
		if ord(sortedone[i + 1]) - ord(sortedone[i]) != 1:
			result = 'NO'
			break
	output.append(result)
for i in output:
	print(i)


(n, s) = (int(input()), [])
for i in range(n):
	s.append(list(input()))
	s[i].sort()
for i in s:
	if len(i) == len(set(i)) and ord(i[-1]) - ord(i[0]) == len(i) - 1:
		print('Yes')
	else:
		print('No')


num = int(input())
for i in range(num):
	x = input()
	pre_length = len(x)
	x = list(set(x))
	now_length = len(x)
	if pre_length != now_length:
		print('No')
	else:
		x = sorted(x)
		length = len(x)
		if ord(x[-1]) - ord(x[0]) == length - 1:
			print('Yes')
		else:
			print('No')


def I():
	return int(input())

def IL():
	return [int(i) for i in input().split()]
for _ in range(I()):
	s = input()
	s = ''.join(sorted(s))
	s1 = [ord(i) for i in s]
	if len(s) == len(set(s)) and all((s1[i] == s1[i - 1] + 1 for i in range(1, len(s1)))):
		print('Yes')
	else:
		print('No')


from sys import stdin, stdout
import cProfile, math
from collections import Counter, defaultdict
from bisect import bisect_left, bisect, bisect_right
import itertools
from copy import deepcopy
from fractions import Fraction
import sys, threading
import operator as op
from functools import reduce
sys.setrecursionlimit(10 ** 6)
threading.stack_size(2 ** 27)
fac_warmup = False
printHeap = str()
memory_constrained = False
P = 10 ** 9 + 7
import sys

class merge_find:

	def __init__(self, n):
		self.parent = list(range(n))
		self.size = [1] * n
		self.num_sets = n
		self.lista = [[_] for _ in range(n)]

	def find(self, a):
		to_update = []
		while a != self.parent[a]:
			to_update.append(a)
			a = self.parent[a]
		for b in to_update:
			self.parent[b] = a
		return self.parent[a]

	def merge(self, a, b):
		a = self.find(a)
		b = self.find(b)
		if a == b:
			return
		if self.size[a] < self.size[b]:
			(a, b) = (b, a)
		self.num_sets -= 1
		self.parent[b] = a
		self.size[a] += self.size[b]
		self.lista[a] += self.lista[b]

	def set_size(self, a):
		return self.size[self.find(a)]

	def __len__(self):
		return self.num_sets

def display(string_to_print):
	stdout.write(str(string_to_print) + '\n')

def primeFactors(n):
	factors = dict()
	for i in range(2, math.ceil(math.sqrt(n)) + 1):
		while n % i == 0:
			if i in factors:
				factors[i] += 1
			else:
				factors[i] = 1
			n = n // i
	if n > 2:
		factors[n] = 1
	return factors

def fibonacci_modP(n, MOD):
	if n < 2:
		return 1
	return (cached_fn(fibonacci_modP, (n + 1) // 2, MOD) * cached_fn(fibonacci_modP, n // 2, MOD) + cached_fn(fibonacci_modP, (n - 1) // 2, MOD) * cached_fn(fibonacci_modP, (n - 2) // 2, MOD)) % MOD

def factorial_modP_Wilson(n, p):
	if p <= n:
		return 0
	res = p - 1
	for i in range(n + 1, p):
		res = res * cached_fn(InverseEuler, i, p) % p
	return res

def binary(n, digits=20):
	b = bin(n)[2:]
	b = '0' * (20 - len(b)) + b
	return b

def isprime(n):
	if n < 4:
		return True
	if n % 2 == 0:
		return False
	if n % 3 == 0:
		return False
	i = 5
	w = 2
	while i * i <= n:
		if n % i == 0:
			return False
		i += w
		w = 6 - w
	return True
factorial_modP = []

def warm_up_fac(MOD):
	global factorial_modP, fac_warmup
	if fac_warmup:
		return
	factorial_modP = [1 for _ in range(fac_warmup_size + 1)]
	for i in range(2, fac_warmup_size):
		factorial_modP[i] = factorial_modP[i - 1] * i % MOD
	fac_warmup = True

def InverseEuler(n, MOD):
	return pow(n, MOD - 2, MOD)

def nCr(n, r, MOD):
	global fac_warmup, factorial_modP
	if not fac_warmup:
		warm_up_fac(MOD)
		fac_warmup = True
	return factorial_modP[n] * (pow(factorial_modP[r], MOD - 2, MOD) * pow(factorial_modP[n - r], MOD - 2, MOD) % MOD) % MOD

def test_print(*args):
	if testingMode:
		print(args)

def display_list(list1, sep=' '):
	stdout.write(sep.join(map(str, list1)) + '\n')

def display_2D_list(li):
	for i in li:
		print(i)

def prefix_sum(li):
	sm = 0
	res = []
	for i in li:
		sm += i
		res.append(sm)
	return res

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))
import heapq, itertools
pq = []
entry_finder = {}
REMOVED = '<removed-task>'

def add_task(task, priority=0):
	if task in entry_finder:
		remove_task(task)
	count = next(counter)
	entry = [priority, count, task]
	entry_finder[task] = entry
	heapq.heappush(pq, entry)

def remove_task(task):
	entry = entry_finder.pop(task)
	entry[-1] = REMOVED

def pop_task():
	while pq:
		(priority, count, task) = heapq.heappop(pq)
		if task is not REMOVED:
			del entry_finder[task]
			return task
	raise KeyError('pop from an empty priority queue')
memory = dict()

def clear_cache():
	global memory
	memory = dict()

def cached_fn(fn, *args):
	global memory
	if args in memory:
		return memory[args]
	else:
		result = fn(*args)
		memory[args] = result
		return result

def ncr(n, r):
	return math.factorial(n) / (math.factorial(n - r) * math.factorial(r))

def binary_serach(i, li):
	fn = lambda x: li[x] - x // i
	x = -1
	b = len(li)
	while b >= 1:
		while b + x < len(li) and fn(b + x) > 0:
			x += b
		b = b // 2
	return x
TestCases = True
testingMode = False
fac_warmup_size = 10 ** 5 + 100
optimiseForReccursion = True
from math import factorial

def main():
	st = list(input())
	st.sort()
	a = ord(st[0]) - 1
	for i in st:
		if ord(i) != a + 1:
			print('NO')
			return
		a += 1
	print('YES')
if TestCases:
	for _ in range(get_int()):
		cProfile.run('main()') if testingMode else main()
else:
	(cProfile.run('main()') if testingMode else main()) if not optimiseForReccursion else threading.Thread(target=main).start()


n = int(input())
alph = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	setic = set()
	s = input()
	if ''.join(sorted(list(s))) in alph:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	s = sorted(map(ord, input()))
	print('YNEOS'[max(s) - min(s) != len(s) - 1 or len(s) != len(set(s))::2])


inpu = int(input())
while inpu:
	a = input()
	d = len(a)
	c = list(a)
	f = []
	for i in range(d):
		f.append(ord(c[i]))
	f.sort()
	con = 1
	mini = min(f)
	for i in range(d):
		if f[i] == mini + i:
			continue
		else:
			print('No')
			con = 0
			break
	if con == 1:
		print('Yes')
	inpu = inpu - 1


cases = int(input())
for i in range(cases):
	case_str = input()
	if len(set(case_str)) != len(case_str):
		print('No')
	elif ''.join(sorted(case_str)) in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input().strip()
	letters = set(s)
	lower_bound = ord(min(letters))
	upper_bound = ord(max(letters))
	if len(s) == len(letters) and upper_bound - lower_bound + 1 == len(s):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	a = list(input())
	arr = []
	c = 1
	for j in a:
		arr.append(ord(j))
	arr.sort()
	for j in range(len(arr) - 1):
		if arr[j] + 1 == arr[j + 1]:
			c += 1
	if c == len(a):
		print('Yes')
	else:
		print('No')


def check_dup(string):
	the_set = set(string)
	return len(the_set) == len(string)

def check_consec(string):
	string_list = [i for i in string]
	string_list.sort()
	to_start = ord(string_list[0])
	for i in string_list:
		if ord(i) != to_start:
			return False
		to_start += 1
	return True
num = int(input().strip())
for i in range(num):
	string = input().strip()
	if not check_dup(string):
		print('no')
	elif not check_consec(string):
		print('no')
	else:
		print('yes')


n = int(input())
for i in range(n):
	string = input()
	leng = len(string)
	if leng == 1:
		print('Yes')
		continue
	arr = [0] * leng
	for j in range(leng):
		arr[j] = ord(string[j])
	arr.sort()
	result = ''
	for j in range(1, leng):
		if arr[j] != arr[j - 1] + 1:
			result = 'No'
			break
		else:
			result = 'Yes'
	print(result)


t = int(input())
for k in range(t):
	s = input()
	lst = list(s)
	if len(set(lst)) != len(lst):
		print('No')
	else:
		lst.sort()
		lst2 = []
		sum = 0
		for i in lst:
			lst2.append(ord(i))
		for i in range(len(lst2) - 1):
			sum += lst2[i + 1] - lst2[i]
		if sum + 1 == len(lst):
			print('Yes')
		else:
			print('No')


def confidential(a):
	s = set(a)
	m = min(a)
	for i in range(len(a)):
		cur = chr(ord(m) + i)
		if cur in s:
			s.remove(cur)
		else:
			return 'NO'
	return 'YES'
N = int(input())
for _ in range(N):
	a = input()
	print(confidential(a))


t = int(input())
for _ in range(t):
	s0 = input()
	n0 = len(s0)
	s1 = set(s0)
	n1 = len(s1)
	if n1 == n0:
		if ord(max(s0)) - 96 == ord(min(s0)) - 96 + (n0 - 1):
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


from sys import stdin, stdout

def main():
	(i, read, write) = (int, stdin.readline, stdout.write)
	n = i(read())
	while n:
		s = read()
		write(other(s))
		n -= 1

def other(s):
	(mp, o, ra, mi, ma, se, le) = (map, ord, range, min, max, set, len)
	if le(s) != le(se(s)):
		return 'No\n'
	else:
		my = se()
		for char in s:
			if char != '\n':
				my.add(o(char))
		for i in ra(mi(my), ma(my)):
			if i not in my:
				return 'No\n'
		return 'Yes\n'
main()


import collections
a = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
while n:
	l = input()
	l = list(l)
	k = list(set(l))
	k = sorted(k)
	p = 0
	for i in range(0, len(k) - 1):
		if abs(ord(k[i]) - ord(k[i + 1])) == 1:
			continue
		else:
			p = 1
			break
	if p == 1 and len(l) > 1 or len(k) < len(l):
		print('no')
	else:
		print('yes')
	n -= 1


def is_various(s):
	if len(s) == 1:
		return True
	arr = sorted(list(s))
	for i in range(len(arr) - 1):
		if chr(ord(arr[i]) + 1) != arr[i + 1]:
			return False
	return True
n = int(input())
for i in range(n):
	print('Yes') if is_various(input()) else print('No')


x = int(input())
t = 0
a = []
for i in range(x):
	a = input()
	t = 0
	for j in range(len(a)):
		flag1 = 0
		flag2 = 0
		for k in range(len(a)):
			if j == k:
				continue
			elif ord(a[j]) == ord(a[k]):
				break
			elif ord(a[j]) == ord(a[k]) + 1 and flag1 == 0:
				t = t + 1
				flag1 = 1
			elif ord(a[j]) == ord(a[k]) - 1 and flag2 == 0:
				t = t + 1
				flag2 = 1
	if t == 2 * len(a) - 2:
		print('YES')
	else:
		print('NO')


n = int(input())
s = '#abcdefghijklmnopqrsyuvwxyz#'
for i in range(n):
	a = input()
	ok = True
	k = []
	for j in range(len(a)):
		if a[j] not in k:
			k.append(ord(a[j]))
	k.sort()
	for j in range(len(k) - 1):
		if k[j] + 1 != k[j + 1]:
			ok = False
	if ok:
		print('Yes')
	else:
		print('No')


t = int(input())
l = 'abcdefghijklmnopqrstuvwxyz'
while t:
	p = []
	flag = 1
	s = input()
	for i in range(len(s)):
		p.append(l.index(s[i]))
	p.sort()
	for i in range(len(p) - 1):
		if p[i + 1] - p[i] != 1:
			flag = 0
			print('NO')
			break
	if flag == 1:
		print('YES')
	t = t - 1


n = int(input())
for i in range(n):
	s = input()
	l = sorted(set(s))
	if len(l) == len(s) and chr(ord(l[0]) + len(s) - 1) == l[len(s) - 1]:
		print('YES')
	else:
		print('NO')


al = 'abcdefghijklmnopqrstuvwxyz'
q = lambda : map(int, input().split())
qi = lambda : int(input())
qs = lambda : input().split()
for i in [0] * qi():
	print('YES' if ''.join(sorted(input())) in al else 'NO')


all_ = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
q = int(input())
for i in range(q):
	arr = list(input())
	arr1 = sorted(arr)
	first = min(arr1)
	last = max(arr1)
	x1 = all_.index(first)
	x2 = all_.index(last)
	flag = 0
	new = []
	for j in range(x1, x2 + 1):
		new.append(all_[j])
	if new == arr1:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	s = input()
	x = set(s)
	m = len
	if m(x) != m(s):
		print('No')
	elif m(x) == 1:
		print('Yes')
	else:
		l = list(x)
		l.sort()
		ok = True
		for i in range(1, m(l)):
			if ord(l[i]) - ord(l[i - 1]) != 1:
				ok = False
				break
		if ok:
			print('Yes')
		else:
			print('No')


__version__ = '0.1'
__date__ = '2019-04-16'
import sys
import string

def main(argv=None):
	n = int(input())
	mydict = dict(zip(string.ascii_lowercase, range(26)))
	for each in range(n):
		counter = [0] * 26
		s = input()
		for ch in s:
			counter[mydict[ch]] += 1
			if counter[mydict[ch]] > 1:
				print('No')
				break
		else:
			started = False
			broken = False
			for i in range(26):
				if counter[i] > 0:
					if not started:
						started = True
					elif broken:
						print('No')
						break
				if counter[i] == 0:
					if started:
						broken = True
			else:
				print('Yes')
	return 0
STATUS = main()
sys.exit(STATUS)


import string, copy

def solution(s):
	s = sorted(s)
	for i in range(len(s) - 1):
		if ord(s[i + 1]) - ord(s[i]) != 1:
			return 'No'
	return 'Yes'

def parser():
	n = int(input())
	nums = []
	for _ in range(n):
		nums.append(input())
	return nums

def output(s):
	print(s)

def main():
	args = parser()
	for case in args:
		result = solution(case)
		output(result)
main()


a = input()
a = int(a)
alpha = 'abcdefghijklmnopqrstuvwxyz'
inputlist = []
for i in range(a):
	inputlist.append(input())
for i in inputlist:
	if ''.join(sorted(i)) in alpha:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	s = sorted(input())
	print('YES' if len(s) == len(set(s)) and ord(max(s)) - ord(min(s)) == len(s) - 1 else 'NO')


def div(c, n):
	l = []
	l = [i for i in c]
	mn = min(l)
	l = sorted(l)
	l1 = [chr(ord(mn) + i) for i in range(n)]
	if l == l1:
		print('YES')
	else:
		print('NO')
n = int(input())
for i in range(n):
	c = input()
	div(c, len(c))


def solve(string):
	used = list(map(ord, string))
	if len(used) != len(set(used)):
		return 'No'
	for i in range(min(used), max(used) + 1):
		if i not in used:
			return 'No'
	return 'Yes'
n = int(input())
for i in range(n):
	a = input().strip()
	print(solve(a))


n = int(input(''))
count = [0 for _ in range(26)]
for _ in range(n):
	s = input('')
	bool_yes = True
	for i in range(26):
		count[i] = 0
	for ch in s:
		count[ord(ch) - ord('a')] += 1
	curr = 0
	n_of_swap = 0
	for i in range(26):
		if count[i] != curr:
			curr = count[i]
			n_of_swap += 1
		if count[i] > 1 or n_of_swap > 2:
			bool_yes = False
			break
	print('Yes' if bool_yes else 'No')


t = int(input())
for _ in range(t):
	alpha = [0] * 26
	a = input()
	n = len(a)
	for i in range(n):
		alpha[ord(a[i]) - 97] += 1
	flag = True
	for alp in alpha:
		if alp > 1:
			flag = False
			break
	if flag:
		i = 0
		while i < 26 and alpha[i] != 1:
			i += 1
		count = 0
		while i < 26 and alpha[i] == 1:
			count += 1
			i += 1
		if count == n:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in range(int(input())):
	s = sorted(input())
	l = [ord(i) for i in s]
	if all((l[i] - l[i - 1] == 1 for i in range(1, len(s)))):
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = list(input())
	e = len(s)
	if e != len(set(s)):
		print('NO')
	else:
		t = True
		s.sort()
		for j in range(e - 1):
			if abs(ord(s[j + 1]) - ord(s[j])) != 1:
				t = False
				break
		if t:
			print('Yes')
		else:
			print('No')


N = int(input())
test = 0
while test < N:
	s = input()
	freq = {}
	for i in range(26):
		freq[chr(97 + i)] = 0
	flag_ad = 0
	flag_dup = 0
	for i in range(len(s)):
		freq[s[i]] += 1
	first = -1
	last = -1
	for i in range(26):
		if freq[chr(97 + i)] >= 1:
			first = i
			break
	for i in range(26):
		if freq[chr(97 + i)] >= 1:
			last = i
	valid = 1
	for i in range(first, last + 1):
		if freq[chr(97 + i)] > 1 or freq[chr(97 + i)] == 0:
			valid = 0
	if valid == 0:
		print('NO')
	else:
		print('YES')
	test += 1


t = int(input())
for i in range(t):
	s = input()
	max1 = 0
	min1 = 200
	m = 1
	l = []
	for j in s:
		max1 = max(max1, ord(j))
		min1 = min(min1, ord(j))
		if j in l:
			m = 0
			break
		else:
			l.append(j)
	if m == 0:
		print('no')
		continue
	if max1 - min1 + 1 == len(s) or len(s) == 1:
		print('yes')
	else:
		print('no')


p = int(input())
for q in range(p):
	l = list(input())
	flag = 1
	if len(l) != len(set(l)):
		print('NO')
	else:
		l.sort()
		for i in range(len(l) - 1):
			if abs(ord(l[i]) - ord(l[i + 1])) != 1:
				flag = 0
				break
		if flag == 0:
			print('NO')
		else:
			print('YES')


for i in range(int(input())):
	s = input()
	tol = len(s)
	if tol < 27:
		f = True
		s = sorted(s)
		a = ord(s[0])
		c = 1
		for j in range(a + 1, a + tol):
			if ord(s[c]) != j:
				f = False
				break
			c += 1
		print('Yes' if f else 'No')
	else:
		print('No')


for i in range(int(input())):
	wordl = [ord(l) for l in list(input())]
	q = len(wordl)
	words = set(wordl)
	a = min(wordl)
	if set(range(a, a + q)) == words:
		print('Yes')
	else:
		print('No')


n = int(input())
for t in range(n):
	st = input()
	freq = [0 for i in range(26)]
	first = None
	last = None
	for s in st:
		idx = ord(s) - ord('a')
		freq[idx] += 1
		if first == None or idx < first:
			first = idx
		if last == None or idx > last:
			last = idx
	if all((f == 1 for f in freq[first:last + 1])):
		print('Yes')
	else:
		print('No')


import sys
n = int(input())
for _ in range(n):
	line = [ord(c) for c in input()]
	line.sort()
	n = len(line)
	diverse = all((line[i] == line[i - 1] + 1 for i in range(1, n)))
	print('Yes' if diverse else 'No')


n = int(input())
for i in range(n):
	flag = False
	s1 = input()
	if len(s1) == 1:
		print('Yes')
	else:
		s1 = sorted(s1)
		for i in range(len(s1) - 1):
			if ord(s1[i + 1]) - ord(s1[i]) != 1:
				print('No')
				flag = 1
				break
		if not flag:
			print('Yes')


def isDivire(string):
	string = sort(string)
	for i in range(1, len(string)):
		if ord(string[i]) - 1 != ord(string[i - 1]):
			return False
	return True

def sort(string):
	array = list(string)
	array.sort()
	result = ''
	for i in array:
		result += i
	return result
n = int(input())
array = []
for i in range(n):
	array.append(input())
for i in array:
	if isDivire(i):
		print('YES')
	else:
		print('NO')


import bisect
import decimal
from decimal import Decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
mod = 10 ** 9 + 7
decimal.getcontext().prec = 46

def primeFactors(n):
	prime = set()
	while n % 2 == 0:
		prime.add(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			prime.add(i)
			n = n // i
	if n > 2:
		prime.add(n)
	return list(prime)

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def modefiedSieve():
	mx = 10 ** 7 + 1
	sieve = [-1] * mx
	for i in range(2, mx):
		if sieve[i] == -1:
			sieve[i] = i
			for j in range(i * i, mx, i):
				if sieve[j] == -1:
					sieve[j] = i
	return sieve

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	num = []
	for p in range(2, n + 1):
		if prime[p]:
			num.append(p)
	return num

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]), reverse=True)

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def DFS(n, s, adj):
	visited = [False for i in range(n + 1)]
	stack = []
	stack.append(s)
	while len(stack):
		s = stack[-1]
		stack.pop()
		if not visited[s]:
			visited[s] = True
		for node in adj[s]:
			if not visited[node]:
				stack.append(node)

def maxSubArraySum(a, size):
	max_so_far = -sys.maxsize - 1
	max_ending_here = 0
	start = 0
	end = 0
	s = 0
	for i in range(0, size):
		max_ending_here += a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
			start = s
			end = i
		if max_ending_here < 0:
			max_ending_here = 0
			s = i + 1
	return (max_so_far, start, end)

def lis(arr):
	n = len(arr)
	lis = [1] * n
	for i in range(1, n):
		for j in range(0, i):
			if arr[i] >= arr[j] and lis[i] < lis[j] + 1:
				lis[i] = lis[j] + 1
	maximum = 0
	for i in range(n):
		maximum = max(maximum, lis[i])
	return maximum

def solve():
	s = list(input())
	if len(set(s)) < len(s):
		print('NO')
		return
	s.sort()
	val = ord(s[0]) + 1
	for i in range(1, len(s)):
		if val != ord(s[i]):
			print('NO')
			return
		val = ord(s[i]) + 1
	print('YES')
t = 1
t = int(input())
for _ in range(t):
	solve()


n = int(input())
for i in range(0, n):
	a = str(input())
	b = sorted(a)
	m = len(b)
	t = 0
	for j in range(1, m):
		if ord(b[j]) - ord(b[j - 1]) != 1:
			t = 1
	if t == 0:
		print('Yes')
	else:
		print('No')


import math
for _ in range(int(input())):
	a = input()
	b = []
	k = 0
	c = []
	for i in range(len(a)):
		c.append(a[i])
		x = ord(a[i])
		b.append(x)
	b.sort()
	for i in range(len(b) - 1):
		if b[i + 1] != b[i] + 1:
			k += 1
	d = list(set(c))
	if len(c) == len(a) and k == 0:
		print('Yes')
	elif len(a) == 1:
		print('Yes')
	else:
		print('No')


a = int(input())
for i in range(a):
	s = sorted(input())
	t = True
	for j in range(1, len(s)):
		if ord(s[j]) - ord(s[j - 1]) != 1:
			t = False
			break
	print('YES' if t else 'NO')


n = int(input())

def check(L):
	T = 'Yes'
	i = 0
	l = len(L)
	while T == 'Yes' and i < l - 1:
		if ord(L[i + 1]) - ord(L[i]) != 1:
			T = 'No'
		i += 1
	return T
ch1 = ''
for j in range(n):
	ch = input('\n')
	L = list(ch)
	L.sort()
	ch1 += check(L) + ' '
L8 = ch1.split(' ')
for m in range(n):
	print(L8[m] + '\n')


def program():
	s = [char for char in input()]
	s2 = set(s)
	n = len(s)
	if n != len(s2):
		print('NO')
		return 0
	l = []
	for x in s:
		l.append(ord(x))
	if n == max(l) - min(l) + 1:
		print('YES')
	else:
		print('NO')
t = int(input())
for i in range(t):
	program()


n = int(input())
for i in range(n):
	s = list(str(input()))
	x = []
	for i in range(len(s)):
		x.append(ord(s[i]) - ord('a'))
	if len(x) == len(set(x)) and max(x) - min(x) + 1 == len(x):
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	s = input()
	s1 = list(s)
	s1.sort()
	f = 1
	for i in range(1, len(s)):
		if ord(s1[i]) - ord(s1[i - 1]) != 1:
			print('NO')
			f = 0
			break
	if f == 1:
		print('YES')


n = int(input())
while n > 0:
	s = input()
	freq = {x: s.count(x) for x in set(s)}
	if len(s) == 1:
		print('Yes')
	else:
		valid = True
		for x in freq.values():
			if x > 1:
				valid = False
		ss = sorted(s)
		f = ss[0]
		l = ss[-1]
		if ord(l) - ord(f) + 1 == len(s) and valid:
			print('Yes')
		else:
			print('No')
	n -= 1


n = int(input())
for i in range(n):
	s = input()
	A = sorted(list(s))
	if len(set(s)) == len(A) and ord(A[-1]) - ord(A[0]) == len(A) - 1:
		print('Yes')
	else:
		print('No')


n = int(input())
a = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	s = input()
	tmp = set(list(s))
	if len(tmp) < len(s):
		print('NO')
		continue
	(ma, mi) = (-1, 33)
	ind = 0
	for item in tmp:
		ind = a.find(item)
		ma = max(ma, ind)
		mi = min(mi, ind)
	if ma - mi + 1 == len(tmp):
		print('YES')
	else:
		print('NO')


for x in range(int(input())):
	s = input()
	if len(set(s)) != len(s):
		print('No')
	else:
		s = list(s)
		s.sort()
		k = ord(s[0])
		for y in s:
			if y != chr(k):
				print('No')
				break
			k += 1
		else:
			print('Yes')


from collections import defaultdict

def check_contiguous(string):
	length = len(string)
	count = defaultdict(int)
	start = ord('z') + 1
	lower_string = string.lower()
	for letter in lower_string:
		count[letter] += 1
		if count[letter] > 1:
			return False
		if ord(letter) < start:
			start = ord(letter)
	for i in range(1, length):
		x = chr(start + i)
		if x in string:
			continue
		else:
			return False
	return True
n = int(input())
for _ in range(n):
	item = input().strip()
	if check_contiguous(item):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = input()
	c = 0
	n = sorted(n)
	for i in range(1, len(n)):
		if ord(n[i]) - 1 != ord(n[i - 1]):
			c = 1
			break
	if c == 0:
		print('Yes')
	else:
		print('No')


for z in range(int(input())):
	str = 'abcdefghijklmnopqrstuvwxyz'
	s = input()
	s = sorted(s)
	res = True
	set_s = set()
	for i in s:
		set_s.add(i)
	if len(set_s) != len(s):
		print('No')
	else:
		index = str.find(s[0])
		for i in range(0, len(s)):
			if s[i] != str[index]:
				res = False
				break
			index += 1
		if res:
			print('Yes')
		else:
			print('No')


T = int(input())
for t in range(T):
	s = input()
	l = []
	for i in s:
		l.append(i)
	l.sort()
	flag = True
	for i in range(len(l) - 1):
		if ord(l[i + 1]) - ord(l[i]) != 1:
			flag = False
			break
	if flag == True:
		print('Yes')
	else:
		print('No')


for x in range(int(input())):
	a = list(input())
	b = set(a)
	if len(a) == len(b) and ord(max(a)) - ord(min(a)) == len(a) - 1:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	s = input()
	if len(s) == 1:
		print('Yes')
	elif len(set(s)) != len(s):
		print('No')
	else:
		a = []
		for i in s:
			a.append(ord(i))
		a.sort()
		d = a[-1] - a[0]
		if d == len(s) - 1:
			print('Yes')
		else:
			print('No')


def check_diverse_string(input_str):
	input_str = sorted(input_str)
	D = dict()
	for i in input_str:
		if i in D:
			return 'NO'
		else:
			D[i] = ord(i)
	cor_seq = list(range(ord(input_str[0]), ord(input_str[0]) + len(input_str)))
	l = []
	for (k, v) in D.items():
		l.append(v)
	if l == cor_seq:
		return 'YES'
	else:
		return 'NO'
n = int(input())
I = []
for i in range(n):
	k = input()
	I.append(k)
for i in range(n):
	print(check_diverse_string(I[i]))


from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt, sin, cos, ceil, floor
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(1000000000)
INF = float('inf')
(YES, Yes, yes, NO, No, no) = ('YES', 'Yes', 'yes', 'NO', 'No', 'no')
(dy4, dx4) = ([0, 1, 0, -1], [1, 0, -1, 0])
(dy8, dx8) = ([0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1])

def inside(y, x, H, W):
	return 0 <= y < H and 0 <= x < W

def ceil(a, b):
	return (a + b - 1) // b

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	g = gcd(a, b)
	return a / g * b

def euclidean_distance(y1, x1, y2, x2):
	return sqrt((y1 - y2) ** 2 + (x1 - x2) ** 2)

def manhattan_distance(y1, x1, y2, x2):
	return abs(y1 - y2) + abs(x1 - x2)

def func(S):
	if len(set(S)) != len(S):
		return No
	t = sorted(S)
	for i in range(len(t) - 1):
		if ord(t[i + 1]) - ord(t[i]) != 1:
			return No
	return Yes

def main():
	N = int(input())
	for _ in range(N):
		S = input()
		print(func(S))
main()


n = int(input())
for i in range(n):
	s = input()
	I = sorted([ord(x) for x in s])
	print('Yes' if len(I) == len(set(I)) and I == [x + min(I) for x in range(len(I))] else 'No')


n = int(input())
w = 0
for i in range(n):
	lst = []
	w = 0
	n1 = input()
	for j in n1:
		lst.append(ord(j))
	lst.sort()
	for k in range(len(lst) - 1):
		if lst[k + 1] - lst[k] > 1 or lst[k + 1] - lst[k] < 1:
			w = w + 1
	if w >= 1:
		print('NO')
	else:
		print('YES')


n = int(input())
S = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	s = sorted([i for i in input()])
	k = ''
	for j in s:
		k += j
	if S.count(k):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	x = []
	s = str(input())
	for j in s:
		x.append(ord(j))
	print('yes' if max(x) - min(x) == len(x) - 1 and len(x) == len(set(x)) else 'no')


for _ in range(int(input())):
	s = list(input())
	if len(set(s)) < len(s):
		print('No')
	else:
		l = sorted(s)
		n = ord(l[len(s) - 1]) - ord(l[0]) + 1
		if len(l) < n:
			print('No')
		else:
			print('Yes')


n = int(input())
for i in range(n):
	s = str(input())
	d = []
	for k in range(len(s)):
		d.append(ord(s[k]))
	e = set(d)
	if max(d) - min(d) == len(s) - 1 and len(e) == len(d):
		print('YES')
	else:
		print('NO')


def diverse(s):
	if len(s) == 1:
		return 'YES'
	alphabets = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
	if sorted(list(set(s))) != sorted(s):
		return 'NO'
	s.sort()
	startingIndex = alphabets.index(s[0])
	endingIndex = startingIndex + len(s)
	if alphabets[startingIndex:endingIndex] == s:
		return 'YES'
	else:
		return 'NO'
n = int(input())
for i in range(n):
	s = list(input())
	print(diverse(s))


import sys
cases = int(sys.stdin.readline().rstrip())
for i in range(0, cases):
	word = sys.stdin.readline().rstrip()
	word = ''.join(sorted(list(word)))
	st = 'Yes'
	for i in range(1, len(word)):
		if ord(word[i]) != ord(word[i - 1]) + 1:
			st = 'No'
	print(st)


def isok(st):
	freq = [0] * 26
	for c in st:
		freq[ord(c) - 97] += 1
		if freq[ord(c) - 97] > 1:
			return 'No'
	seq = list(filter(lambda x: len(x) > 0, ''.join([str(x) for x in freq]).split('0')))
	if len(seq) > 1:
		return 'No'
	return 'Yes'
t = int(input())
for _ in range(t):
	st = input().strip().lower()
	print(isok(st))


n = int(input())
a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for a0 in range(n):
	s = sorted(input())
	count = 0
	x = a.index(s[0])
	for i in range(len(s)):
		if x < 26 and s[i] == a[x]:
			count += 1
			x += 1
		else:
			print('No')
			break
	if count == len(s):
		print('Yes')


IN = input
rint = lambda : int(IN())
rlist = lambda : list(map(int, IN().split()))
for p in range(rint()):
	s = IN()
	a = [0] * 26
	for c in s:
		a[ord(c) - ord('a')] += 1
	i = 0
	while not a[i]:
		i += 1
	while i < 26 and a[i] == 1:
		i += 1
	while i < 26 and (not a[i]):
		i += 1
	if i < 26:
		print('No')
	else:
		print('Yes')


let = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
n = int(input())
verd = []
for i in range(n):
	s = input()
	pos = True
	unic = True
	for i in s:
		if s.count(i) > 1:
			unic = False
			break
	a = []
	for i in s:
		a.append(i)
	a.sort()
	for i in range(len(a) - 1):
		if let.index(a[i + 1]) - let.index(a[i]) != 1:
			pos = False
			break
	if pos and unic:
		verd.append('Yes')
	else:
		verd.append('No')
for i in verd:
	print(i)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
n = inp()
for i in range(n):
	s = insr()
	se = set(s)
	if len(s) != len(se):
		print('NO')
	else:
		s.sort()
		a = s[0]
		z = s[len(s) - 1]
		s1 = list(map(chr, range(ord(a), ord(z) + 1)))
		if s == s1:
			print('YES')
		else:
			print('NO')


import math
n = int(input())

def isdiverse(w):
	d = {}
	for i in range(len(w)):
		d[w[i]] = d.get(w[i], 0) + 1
		if d[w[i]] > 1:
			return 'No'
	w = sorted(w)
	for i in range(len(w) - 1):
		if abs(ord(w[i]) - ord(w[i + 1])) > 1:
			return 'No'
	return 'Yes'
for _ in range(n):
	w = input()
	print(isdiverse(w))


def is_diverse(s):
	letters = set()
	for c in s:
		if ord(c) in letters:
			return False
		letters.add(ord(c))
	ss = sorted(list(letters))
	for i in range(1, len(ss)):
		if ss[i] != ss[i - 1] + 1:
			return False
	return True

def main():
	n = int(input().strip())
	for _ in range(n):
		s = input().strip()
		if is_diverse(s):
			print('Yes')
		else:
			print('No')
main()


while True:
	try:
		n = int(input())
		while n > 0:
			ch = input()
			ch = ''.join(sorted(ch))
			l = len(ch)
			p = 0
			for i in range(1, l):
				if ch[i] != chr(ord(ch[i - 1]) + 1):
					p = 1
					break
			if p:
				print('No')
			else:
				print('Yes')
			n -= 1
	except:
		break


from collections import Counter
n = int(input())
for _ in range(n):
	s = input()
	if len(Counter(s)) == len(s):
		l = list(map(ord, list(Counter(s))))
		l.sort()
		k = l[0]
		for i in l:
			if i != k:
				print('NO')
				break
			k = k + 1
		else:
			print('YES')
	else:
		print('NO')


n = int(input())
alpha = list('abcdefghijklmnopqrstuvwxyz')
for _ in range(n):
	string = input()
	list1 = list(string)
	list1.sort()
	l = len(list1)
	for i in range(1, l):
		if list1[i - 1] == list1[i]:
			break
	else:
		if alpha.index(list1[-1]) - alpha.index(list1[0]) == l - 1:
			print('Yes')
		else:
			print('No')
		continue
	print('No')


def checkDiverse(arr):
	arr = list(arr)
	arr_codes = [ord(x) for x in set(list(arr))]
	if len(arr_codes) != len(arr):
		return False
	big = max(arr_codes)
	small = min(arr_codes)
	if big - small + 1 == len(arr):
		return True
	return False
tc = int(input())
while tc > 0:
	string = input()
	isYes = checkDiverse(string)
	if isYes:
		print('Yes')
	else:
		print('No')
	tc -= 1


from string import ascii_lowercase as l
l += l
n = int(input())
for _ in range(n):
	if ''.join(sorted(input())) in l:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	s = input()
	l = []
	ml = False
	for char in s:
		if char in l:
			ml = True
			break
		else:
			l.append(char)
	l.sort()
	a = True
	for i in range(1, len(l)):
		if abs(ord(l[i]) - ord(l[i - 1])) != 1:
			a = False
			break
	if a == False or ml == True:
		print('No')
	else:
		print('Yes')


a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
b = int(input())
m = []
for i in range(b):
	c = input()
	if len(c) == 1:
		m.append('Yes')
	else:
		h = []
		l = True
		for g in c:
			h.append(g)
		for g in range(len(h) - 1):
			for k in range(len(h) - 1):
				if h[k] > h[k + 1]:
					(h[k], h[k + 1]) = (h[k + 1], h[k])
		for j in range(len(h) - 1):
			if a.index(h[j + 1]) - a.index(h[j]) > 1 or h[j] == h[j + 1]:
				m.append('No')
				l = False
				break
		if l == True:
			m.append('Yes')
for i in m:
	print(i)


def danil(s):
	h = ''
	s = sorted(s)
	for x in s:
		h += str(x)
	return h
n = int(input())
check = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	used = ''
	ans = True
	a = input()
	if len(a) == 1:
		print('Yes')
	else:
		for x in a:
			if x not in used:
				used += x
			else:
				ans = False
				break
		if ans:
			ans = False
			if danil(a) in check:
				ans = True
		if ans:
			print('Yes')
		else:
			print('No')


def divStr(s):
	s.sort()
	for i in range(len(s) - 1):
		if ord(s[i]) + 1 != ord(s[i + 1]):
			return 'No'
	return 'Yes'
t = int(input())
for i in range(t):
	s = list(input())
	print(divStr(s))


num = input()
for i in range(int(num)):
	a = input()
	if len(a) == 1:
		print('yes')
	else:
		hist = [0] * 26
		index = []
		for j in range(len(a)):
			asci = ord(a[j]) % 97
			hist[asci] += 1
			index.append(asci)
		index.sort(reverse=False)
		temp = index[0]
		is_adj = True
		for k in index[1:]:
			if temp != k - 1:
				is_adj = False
				break
			temp = k
		if max(hist) <= 1 and is_adj:
			print('yes')
		else:
			print('No')


length = int(input())
for x in range(length):
	list1 = list(input())
	diff = 0
	list1.sort()
	if len(list1) == 1:
		print('Yes')
	else:
		for i in range(0, len(list1) - 1):
			diff = ord(list1[i + 1]) - ord(list1[i])
			if diff != 1:
				print('No')
				break
		if diff == 1:
			print('Yes')


from collections import defaultdict

def solve():
	for _ in range(int(input())):
		s = [c for c in input()]
		s.sort()
		ans = 'Yes'
		for i in range(1, len(s)):
			if ord(s[i - 1]) + 1 != ord(s[i]):
				ans = 'No'
				break
		print(ans)
solve()


test_cases = int(input())
for i in range(test_cases):
	case = str(input())
	if len(case) > 26:
		print('No')
		continue
	else:
		sort = sorted(case)
		diverse = 1
		for (index, c) in enumerate(sort):
			if index == 0:
				continue
			elif ord(c) - ord(sort[index - 1]) != 1:
				diverse = 0
				break
		if diverse:
			print('Yes')
		else:
			print('No')


t = int(input())
for i in range(0, t):
	string = str(input())
	sorted_str = sorted(string)
	sorted_str.sort()
	f = 0
	for i in range(0, len(sorted_str) - 1):
		if ord(sorted_str[i + 1]) - ord(sorted_str[i]) != 1:
			f = 1
			break
	if f == 1:
		print('no')
	else:
		print('yes')


n = int(input())
for _ in range(n):
	s = input()
	a = [ord(c) - ord('a') for c in s]
	flag = sorted(a) == list(range(min(a), max(a) + 1))
	print('Yes' if flag else 'No')


n = int(input())
for i in range(n):
	a = []
	s = input()
	k = 1
	for i in range(len(s)):
		a.append(ord(s[i]))
	a = sorted(a)
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] == 1:
			k += 1
	if k == len(s):
		print('YES')
	else:
		print('nO')


for i in range(int(input())):
	A = input()
	A = sorted((ord(a) for a in A))
	print('Yes' if A[-1] - A[0] == len(A) - 1 and len(set(A)) == len(A) else 'No')


def f(a: list):
	for i in range(len(a) - 1):
		if ord(a[i + 1]) - ord(a[i]) != 1:
			print('No')
			return
	print('Yes')
for _ in range(int(input())):
	s = input()
	a = sorted(set(s))
	if len(s) != len(a):
		print('No')
	else:
		f(a)


n = int(input())
for nn in range(n):
	word = list(input())
	if len(word) > 26:
		print('No')
	else:
		my_set = sorted(set(word))
		if ord(my_set[-1]) - ord(my_set[0]) == len(word) - 1 and len(word) == len(my_set):
			print('Yes')
		else:
			print('No')


import string

def isDiverse(s):
	d = {'a': 0, 'b': 0, 'c': 0, 'd': 0, 'e': 0, 'f': 0, 'g': 0, 'h': 0, 'i': 0, 'j': 0, 'k': 0, 'l': 0, 'm': 0, 'n': 0, 'o': 0, 'p': 0, 'q': 0, 'r': 0, 's': 0, 't': 0, 'u': 0, 'v': 0, 'w': 0, 'x': 0, 'y': 0, 'z': 0}
	s = s.lower()
	for l in s:
		if l.isalpha():
			d[l] = d[l] + 1
			if d[l] > 1:
				print('No')
				return
	p = 0
	for b in d.keys():
		if p == 0:
			if d[b] != 0:
				p = 1
				continue
		if p == 1:
			if d[b] == 0:
				p = 2
				continue
		if p == 2:
			if d[b] != 0:
				print('No')
				return
	print('Yes')
	return
n = int(input().strip())
t = []
for i in range(n):
	t.append(input().strip())
for i in range(n):
	isDiverse(t[i])


for i in range(int(input())):
	st = str(input())
	test = []
	for i in range(ord(min(st)), ord(max(st)) + 1):
		test.append(i)
	string = []
	for j in st:
		string.append(ord(j))
	final = []
	for i in string:
		if i not in final:
			final.append(i)
	if sum(test) == sum(final) and len(string) == len(test):
		print('YES')
	else:
		print('NO')


n = int(input())
for _ in range(n):
	string = input()
	sets = sorted(set(string))
	if len(sets) == len(string) and ord(sets[-1]) - ord(sets[0]) == len(string) - 1:
		print('Yes')
	else:
		print('No')


alph = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

def check(string):
	if len(string) == 1:
		return 'Yes'
	letter = alph.index(string[0])
	for i in string[1:]:
		try:
			if alph[letter + 1] == i:
				letter += 1
			else:
				return 'No'
		except:
			return 'No'
	return 'Yes'
i = int(input())
sentences = []
for i in range(i):
	sentences.append(sorted(input()))
for i in sentences:
	print(check(i))


n = int(input())
for i in range(n):
	str = sorted(input())
	prev = ord(str[0])
	for s in str[1:]:
		if prev + 1 != ord(s):
			print('No')
			break
		prev = ord(s)
	else:
		print('Yes')


for _ in range(int(input())):
	a = sorted(input())
	s = ''
	for i in a:
		s += i
	t = 'abcdefghijklmnopqrstuvwxyz'
	if s in t:
		print('YES')
	else:
		print('NO')


n = int(input())
for t in range(n):
	s = input()
	d = dict()
	ans = 'Yes'
	for x in s:
		if ord(x) in d:
			ans = 'No'
			break
		d[ord(x)] = True
	if ans == 'No':
		print(ans)
	else:
		a = min(d.keys())
		b = max(d.keys())
		for i in range(a, b + 1):
			if i not in d:
				ans = 'No'
		print(ans)


N = int(input())
for _ in range(N):
	x = 'abcdefghijklmnopqrstuvwxyz'
	string = ''.join(sorted(input()))
	if string in x:
		print('Yes')
	else:
		print('No')


n = int(input())
m = []
for i in range(n):
	k = input()
	m.append(k)
for i in range(n):
	l = 0
	o = 0
	a = m[i]
	a.split()
	a = list(a)
	a.sort()
	a = ''.join(a)
	h = len(a)
	for j in range(h - 1):
		if a[j] == a[j + 1]:
			l = l + 1
		if ord(a[j + 1]) - ord(a[j]) != 1:
			o = o + 1
	if l == 0 and o == 0:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	l = list(input())
	mb = True
	l.sort()
	for i in range(1, len(l)):
		if abs(ord(l[i - 1]) - ord(l[i])) != 1:
			mb = False
	if mb and len(list(set(l))) == len(l):
		print('YES')
	else:
		print('NO')


def f(x):
	ans = ''
	for i in x:
		ans += i
	return ans
n = int(input())
y = False
alf = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	s = input()
	s = sorted(s)
	s = f(s)
	if alf.count(s) == 1:
		print('Yes')
	else:
		print('No')


x = int(input())
for i in range(x):
	y = input()
	y = ''.join(sorted(list(y)))
	a = y[0]
	t = True
	for i in range(1, len(y)):
		if ord(y[i]) - ord(a) != 1 or a == 'z':
			t = False
		a = y[i]
	if t:
		print('YES')
	else:
		print('NO')


n = int(input())
for j in range(n):
	o = [0] * 26
	s = input()
	for i in range(len(s)):
		o[ord(s[i]) - 97] += 1
	f = 1
	for i in range(26):
		if o[i] > 1:
			f = 0
	cnt = 0
	for i in range(26):
		if o[i] == 1:
			if cnt == 0 or cnt == 1:
				cnt = 1
			else:
				f = 0
		elif cnt == 1:
			cnt = -1
	if f == 1:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	s = input()
	f = [0 for _ in range(26)]
	for c in s:
		f[ord(c) - ord('a')] += 1
	ok = False
	for i in range(26):
		for j in range(i, 26):
			_ok = True
			for k in range(26):
				if f[k] != (1 if i <= k <= j else 0):
					_ok = False
			if _ok:
				ok = True
	print('Yes' if ok else 'No')


n = int(input())
for i in range(n):
	s = input()
	x = 0
	if len(s) == 1:
		print('Yes')
	else:
		l = []
		for c in s:
			if c not in l:
				l.append(c)
		if len(l) == len(s):
			l.sort()
			if ord(l[len(l) - 1]) - ord(l[0]) == len(l) - 1:
				print('Yes')
			else:
				print('No')
		else:
			print('No')


from collections import defaultdict
d = defaultdict(int)
s = '0abcdefghijklmnopqrstuvwxyz'
for i in range(1, 27):
	d[s[i]] = i
for z in range(int(input())):
	s = input()
	t = ''.join(sorted(s))
	i = 1
	while i < len(t):
		if d[t[i]] != d[t[i - 1]] + 1:
			print('No')
			break
		i += 1
	else:
		print('Yes')


n = int(input())
a = 0
while a < n:
	s = ''.join(sorted(input()))
	if s in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
	else:
		print('No')
	a += 1


x = 'abcdefghijklmnopqrstuvwxyz'
t = int(input())
for i in range(t):
	a = input()
	if len(set(a)) == len(list(a)):
		b = list(a)
		b.sort()
		q = ''
		for j in b:
			q += j
		if q in x:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


from sys import stdin, stdout
from itertools import combinations
from collections import defaultdict
import math
import heapq

def listIn():
	return list(map(int, stdin.readline().strip().split()))

def stringListIn():
	return [x for x in stdin.readline().split()]

def intIn():
	return int(stdin.readline())

def stringIn():
	return stdin.readline().strip()
N = intIn()
for i in range(N):
	s = stringIn()
	if len(s) == len(set(s)):
		ss = sorted(s)
		flag = True
		for i in range(1, len(ss)):
			if ord(ss[i]) == ord(ss[i - 1]) + 1:
				continue
			else:
				flag = False
				break
		if flag:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = int(input())
strings = []
out = [''] * n
for i in range(n):
	strings.append(input())
for line in range(len(strings)):
	sort_string = sorted(strings[line])
	freq = dict()
	to_print = 'Yes'
	for letter in range(len(sort_string)):
		freq[sort_string[letter]] = freq.get(sort_string[letter], 0) + 1
		if freq[sort_string[letter]] > 1:
			to_print = 'No'
			break
		if letter < len(sort_string) - 1:
			if ord(sort_string[letter]) - ord(sort_string[letter + 1]) != -1:
				to_print = 'No'
				break
	print(to_print)


n = int(input())
for i in range(0, n):
	s = input()
	a = sorted(s)
	f = 0
	for j in range(1, len(s)):
		if ord(a[j]) - ord(a[j - 1]) != 1:
			f = 1
			print('NO')
			break
	if f == 0:
		print('YES')


n = int(input())
for _ in range(n):
	s = sorted(input())
	di = True
	for i in range(1, len(s)):
		if ord(s[i]) != ord(s[i - 1]) + 1:
			di = False
	print('Yes' if di else 'No')


n = int(input())
for i in range(n):
	string = input()
	alp = [False] * 26
	for e in string:
		index = ord(e) - ord('a')
		alp[index] = True
	if alp.count(True) != len(string):
		print('No')
		continue
	check = alp.index(True)
	if alp[check:check + len(string)] == [True] * len(string):
		print('Yes')
	else:
		print('No')


gi = lambda : list(map(int, input().strip().split()))
(n,) = gi()
alph = 'abcdefghijklmnopqrstuvwxyz'
for k in range(n):
	s = list(input())
	s.sort()
	s = ''.join(s)
	if len(s) > 26 or s not in alph:
		print('No')
	else:
		print('Yes')


import re, math, decimal, bisect, collections

def read():
	return input().strip()

def iread():
	return int(input().strip())

def viread():
	return [int(_) for _ in input().strip().split()]

def round(n):
	return int(n + 0.5)
n = iread()
for i in range(n):
	s = read()
	occ = dict(zip('qwertyuiopasdfghjklzxcvbnm', [0] * 26))
	for c in s:
		occ[c] += 1
	ls = 0
	good = False
	start = False
	for c in sorted(occ):
		if occ[c] == 1:
			good = True
		if occ[c] > 1 or (occ[c] == 1 and ls == 0 and start):
			good = False
			break
		if occ[c] == 1:
			start = True
		ls = occ[c]
	print('Yes' if good else 'No')


tc = int(input())
while tc:
	s = ''.join(sorted(list(input())))
	if s in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
	else:
		print('No')
	tc -= 1


def SI():
	return input()

def II():
	return int(SI())

def STI():
	return SI().split()

def ITI():
	return map(int, STI())

def SLI():
	return list(SI())

def ILI():
	return list(ITI())
n = II()
for _ in range(n):
	l = SLI()
	ll = len(l)
	ol = sorted(l)
	for i in range(ll - 1):
		if ord(ol[i]) != ord(ol[i + 1]) - 1:
			print('No')
			break
	else:
		print('Yes')


t = int(input())
for i in range(t):
	r = input()
	r = r.upper()
	r = list(r)
	r.sort()
	yu = ''
	res = str(''.join(r))
	e = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
	if res in e:
		print('YES')
	else:
		print('NO')


n = int(input())
a = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	x = input()
	y = []
	for j in x:
		if a.index(j) not in y:
			y.append(a.index(j))
	if min(y) * len(x) + len(x) * (len(x) - 1) // 2 == sum(y) and len(y) == len(x):
		print('Yes')
	else:
		print('No')


N = int(input())
for i in range(N):
	X = sorted(input())
	if len(set(X)) != len(X):
		print('NO')
		continue
	Index = 1
	while Index < len(X):
		if abs(ord(X[Index]) - ord(X[Index - 1])) != 1:
			break
		Index += 1
	print('NO' if Index != len(X) else 'YES')


n = int(input())
for _ in range(n):
	s = input()
	a = []
	for i in s:
		a.append(ord(i))
	a.sort()
	flag = True
	for i in range(1, len(a)):
		if a[i] != a[i - 1] + 1:
			flag = False
	if flag:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	s = input()
	s = sorted(s)
	if len(set(s)) != len(s):
		print('No')
	else:
		a = s[0]
		for i in range(1, len(s)):
			if abs(ord(s[i]) - ord(a)) != 1:
				print('No')
				break
			a = s[i]
		else:
			print('Yes')


for i in range(int(input())):
	s = str(input())
	s1 = sorted(s)
	if len(s1) == 1:
		print('yes')
	else:
		flag = 0
		for i in range(0, len(s1) - 1):
			if ord(s1[i + 1]) - ord(s1[i]) == 1:
				continue
			else:
				flag = 1
				break
		if flag == 1:
			print('no')
		else:
			print('yes')


def f():
	temp = int(input())
	for _ in range(temp):
		string = input()
		unique = list(set(string))
		len1 = len(string)
		len2 = len(unique)
		if len1 == len2:
			unique.sort()
			last = unique[-1]
			first = ord(unique[0])
			if last == chr(first + len1 - 1):
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
f()


n = int(input())
for i in range(n):
	word = input()
	word = list(word)
	tmp = set(word)
	if len(word) != len(tmp):
		print('NO')
	else:
		word.sort()
		status = 1
		for j in range(len(word) - 1):
			if ord(word[j + 1]) - ord(word[j]) != 1:
				status = -1
		if status == -1:
			print('NO')
		else:
			print('YES')


import string
N = int(input())
for _ in range(N):
	s = input()
	res = True if all([s.count(a) <= 1 for a in string.ascii_lowercase]) else False
	if res:
		l = sorted(list(s))
		for i in range(len(s) - 1):
			if ord(l[i]) + 1 != ord(l[i + 1]):
				res = False
				break
	if res:
		print('Yes')
	else:
		print('No')


n = int(input())
alph = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for i in range(n):
	s = input()
	flag = True
	s = sorted(s)
	firsti = alph.index(s[0])
	for i in range(0, len(s)):
		if i != 0:
			firsti += 1
		if (s[i] not in alph or s.count(s[i]) != 1 or alph[firsti] != s[i]) and flag == True:
			print('NO')
			flag = False
			break
	if flag == True:
		print('YES')


import math
import bisect

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, x, y) = egcd(b % a, a)
		return (g, y - b // a * x, x)

def mulinv(b, n):
	(g, x, _) = egcd(b, n)
	if g == 1:
		return x % n
primes = []

def isprime(n):
	for d in range(2, int(math.sqrt(n)) + 1):
		if n % d == 0:
			return False
	return True

def argsort(ls):
	return sorted(range(len(ls)), key=ls.__getitem__)

def f(p=0):
	if p == 1:
		return map(int, input().split())
	elif p == 2:
		return list(map(int, input().split()))
	else:
		return int(input())
n = f()
for i in range(n):
	s = sorted(input())
	n = len(s)
	st = list(set(s))
	ln = len(st)
	if n != ln or ord(s[-1]) - ord(s[0]) + 1 != ln:
		print('NO')
	else:
		print('YES')


l = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(int(input())):
	if ''.join(sorted(input())) in l:
		print('yes')
	else:
		print('no')


for _ in range(int(input())):
	s = input()
	s = list(s)
	s = sorted(s)
	flag = 0
	if len(s) == len(set(s)):
		for i in range(1, len(s)):
			if ord(s[i]) - ord(s[i - 1]) != 1:
				flag = 1
				break
		if flag == 1:
			print('No')
		else:
			print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	a = input()
	b = []
	for k in a:
		if ord(k) not in b:
			b.append(ord(k))
		else:
			print('No')
			break
	else:
		if max(b) - min(b) + 1 == len(b):
			print('Yes')
		else:
			print('No')


from sys import stdin, stdout
import bisect
import math

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
			n = n - 1
		else:
			a = a * a
			n = n >> 1
	return r

def solve():
	s = st()
	s.sort()
	x = ''
	for i in range(ord(s[0]), ord(s[-1]) + 1):
		x += chr(i)
	a = ''.join(s)
	if x == a:
		print('YES')
	else:
		print('NO')
for _ in range(inp()):
	solve()


for i in range(int(input())):
	s = sorted(input())
	v = list(map(chr, range(ord(s[0]), ord(s[-1]) + 1)))
	if s == v:
		print('Yes')
	else:
		print('No')


n = int(input())
f = None
for j in range(n):
	f = 1
	s = input()
	if len(s) == 1:
		print('Yes')
		continue
	s = sorted(s)
	for i in range(1, len(s)):
		if ord(s[i]) == ord(s[i - 1]) + 1:
			u = 1
		else:
			f = 0
	if f == 1:
		print('Yes')
	else:
		print('No')


import math
from collections import defaultdict
ml = lambda : map(int, input().split())
ll = lambda : list(map(int, input().split()))
ii = lambda : int(input())
ip = lambda : input()
t = ii()
for _ in range(t):
	n = list(ip())
	if len(n) > 26:
		print('NO')
	else:
		a = min(n)
		b = max(n)
		a = ord(a)
		b = ord(b)
		if len(n) == b - a + 1 and len(n) == len(set(n)):
			print('YES')
		else:
			print('NO')


n = int(input())
alpha = list('abcdefghijklmnopqrstuvwxyz')
inpL = []
for z in range(n):
	inpL.append(str(input()))
for i in inpL:
	isTrue = True
	started = False
	ended = False
	patternNoError = True
	for letter in range(26):
		if alpha[letter] in i:
			if i.count(alpha[letter]) > 1:
				isTrue = False
				break
			if not started:
				if not ended:
					started = True
				else:
					patternNoError = False
					break
		elif started:
			started = False
			ended = True
	if isTrue and patternNoError:
		print('YES')
	else:
		print('NO')


def diverse(word):
	if len(word) == 1:
		return 'Yes'
	s = set(word)
	if len(s) != len(word):
		return 'No'
	found = [0] * 26
	for i in s:
		found[ord(i) - 97] = 1
	for (i, e) in enumerate(found):
		if e:
			ind = i
			while found[ind]:
				ind += 1
				if ind == 25:
					return 'Yes'
			if ind == 25:
				return 'Yes'
			ind += 1
			while ind <= 25:
				if found[ind]:
					return 'no'
				ind += 1
	return 'Yes'
n = int(input())
words = []
for _ in range(n):
	words.append(input())
for word in words:
	print(diverse(word))


for _ in range(int(input())):
	s = list(input())
	n = len(s)
	nn = len(set(s))
	if nn == n:
		min1 = min(s)
		c = ord(min1)
		nd = 1
		for i in range(1, n):
			if chr(i + c) in s:
				nd += 1
		if nd == n:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for _ in ' ' * int(input()):
	print('YNeos'[(''.join(sorted(input())) in 'abcdefghijklmnopqrstuvwxyz') == 0::2])


n = int(input())
for i in range(n):
	s = input()
	l = []
	ans = 1
	for j in s:
		a = ord(j)
		l.append(a)
	l = sorted(l)
	for j in range(1, len(l)):
		if l[j] - 1 != l[j - 1]:
			print('No')
			ans = 0
			break
	if ans == 1:
		print('Yes')


import sys
import random

class Main:

	def __init__(self):
		self.buff = None
		self.index = 0

	def next(self):
		if self.buff is None or self.index == len(self.buff):
			self.buff = sys.stdin.readline().split()
			self.index = 0
		val = self.buff[self.index]
		self.index += 1
		return val

	def next_int(self):
		return int(self.next())

	def ck(self, s):
		x = None
		for c in sorted(s):
			if x is not None and ord(c) != ord(x) + 1:
				return False
			x = c
		return True

	def solve(self):
		n = self.next_int()
		for _ in range(0, n):
			print('Yes' if self.ck(self.next()) else 'No')
Main().solve()


def check(s):
	if len(s) != len(set(s)):
		return 'No'
	minimum = ord(s[0])
	maximum = ord(s[0])
	for i in s:
		x = ord(i)
		if x > maximum:
			maximum = x
		elif x < minimum:
			minimum = x
	if maximum - minimum + 1 == len(s):
		return 'Yes'
	else:
		return 'No'
n = int(input())
for i in range(n):
	x = input()
	print('No' if len(x) > 26 else check(x))


def isDiverse(s):
	alphabet = 'abcdefghijklmnopqrstuvwxyz'
	return s in alphabet

def isYes(b):
	if b:
		return 'Yes'
	else:
		return 'No'
n = int(input())
for i in range(n):
	s = input()
	l = list(s)
	l.sort()
	print(isYes(isDiverse(''.join(l))))


def check_seq(s):
	d = [0] * 256
	min_ch = ord('z')
	for ch in s:
		ch = ord(ch)
		if d[ch] > 0:
			return 'No'
		d[ch] += 1
		if ch < min_ch:
			min_ch = ch
	for i in range(min_ch, min_ch + len(s)):
		if d[i] != 1:
			return 'No'
	return 'Yes'
count = int(input())
out = []
for i in range(count):
	out.append(check_seq(input()))
for s in out:
	print(s)


for _ in range(int(input())):
	s = sorted(input())
	if len(s) != len(set(s)):
		print('No')
		continue
	last = s[0]
	for i in s[1:]:
		if ord(last) + 1 != ord(i):
			print('No')
			break
		last = i
	else:
		print('Yes')


d = {'s': 19, 'g': 7, 'y': 25, 'm': 13, 'b': 2, 'j': 10, 't': 20, 'c': 3, 'o': 15, 'x': 24, 'u': 21, 'l': 12, 'z': 26, 'e': 5, 'q': 17, 'k': 11, 'w': 23, 'n': 14, 'a': 1, 'd': 4, 'h': 8, 'i': 9, 'f': 6, 'v': 22, 'r': 18, 'p': 16}
from collections import Counter
n = int(input())
lst = []
for i in range(n):
	a = input()
	lst.append(a)
for i in lst:
	i_dict = dict(Counter(i))
	if not any((value > 1 for value in i_dict.values())):
		position_lst = []
		for k in i:
			position_lst.append(d[k])
		if max(position_lst) - min(position_lst) < len(position_lst):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = int(input())
for i in range(n):
	m = list(input())
	n = set(m)
	if len(m) != len(n):
		print('NO')
	else:
		l = []
		for i in range(len(m)):
			l.append(ord(m[i]))
			l.sort()
		if len(l) == l[-1] - l[0] + 1:
			print('YES')
		else:
			print('NO')


def is_different(string):
	string = sorted(string)
	for i in range(len(string) - 1):
		if ord(string[i]) != ord(string[i + 1]) - 1:
			return False
	return True

def are_strings_different(strings):
	for string in strings:
		print('Yes' if is_different(string) else 'No')
n = int(input())
strings = [input() for _ in range(n)]
are_strings_different(strings)


n = int(input())
for i in range(n):
	s = input()
	flag = 1
	for j in range(len(s) - 1):
		for k in range(j + 1, len(s)):
			if s[k] == s[j]:
				flag = 0
				break
			s1 = str(''.join(sorted(s)))
			if ord(s1[j + 1]) != ord(s1[j]) + 1:
				flag = 0
				break
	if flag == 0:
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	s = list(input())
	s.sort()
	f = 0
	for i in range(1, len(s)):
		if ord(s[i]) - ord(s[i - 1]) != 1:
			f = 1
			break
	if f == 0:
		print('YES')
	else:
		print('NO')


for i in range(int(input())):
	s = sorted(list(input()))
	for i in range(len(s) - 1):
		if abs(ord(s[i]) - ord(s[i + 1])) != 1:
			print('No')
			break
	else:
		print('Yes')


n = int(input())
a = []
for i in range(n):
	a.append(input())
for i in range(n):
	d = []
	d[:0] = a[i]
	d.sort()
	kk = 'abcdefghijklmnopqrstuvwxyz'
	ss = ''.join(d)
	if ss in kk:
		print('Yes')
	else:
		print('No')


def solve(s):
	a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
	if len(set(a)) != len(a):
		return 'NO'
	if a.find(s) != -1:
		return 'Yes'
	else:
		return 'No'
n = int(input())
for i in range(n):
	s = ''.join(sorted(list(input()))).upper()
	print(solve(s))


n = int(input())
while n:
	s = input()
	a = []
	for i in range(len(s)):
		a.append(s[i])
	a.sort()
	if len(a) == len(set(a)):
		b = ord(a[0])
		count = 0
		for j in range(len(a)):
			if ord(a[j]) == b:
				count += 1
				b += 1
		if count == len(a):
			print('Yes')
		else:
			print('No')
	else:
		print('No')
	n -= 1


for _ in range(int(input())):
	x = input()
	print('Yes' if ord(max(x)) - ord(min(x)) == len(x) - 1 and len(set(x)) == len(x) else 'No')


from sys import stdin, stdout
import sys
import math
sys.setrecursionlimit(15000)

def get_freq(string):
	freq = [0] * 26
	for i in string:
		freq[ord(i) - 97] += 1
	return freq

def check(freq):
	for i in freq:
		if i > 1:
			return False
	return True
n = int(stdin.readline().strip())
for _ in range(n):
	string = list(stdin.readline().strip())
	if len(string) == 1:
		print('Yes')
		continue
	string.sort()
	freq = get_freq(string)
	if check(freq):
		for i in range(1, len(string)):
			if ord(string[i]) - ord(string[i - 1]) != 1:
				print('No')
				break
		else:
			print('Yes')
	else:
		print('No')


def is_diverse(line):
	line_set = set()
	no = 'No'
	yes = 'Yes'
	for i in line:
		if ord(i) in line_set:
			return no
		else:
			line_set.add(ord(i))
	sorted_num = sorted(line_set)
	for i in range(len(sorted_num)):
		if i != 0 and sorted_num[i] - sorted_num[i - 1] != 1:
			return no
	return yes

def loop_n(n, lst):
	for i in range(n):
		print(is_diverse(lst[i]))
n = int(input())
lst = []
for i in range(n):
	str_ = map(str, input())
	lst.append(str_)
loop_n(n, lst)


def confere(v):
	for i in range(0, 26):
		if v[i] == 1:
			break
	for j in range(25, -1, -1):
		if v[j] == 1:
			break
	for k in range(i, j + 1):
		if v[k] != 1:
			return 0
	return 1
n = int(input())
for i in range(0, n):
	s = input()
	v = [0] * 26
	flag = 1
	for j in range(0, len(s)):
		v[ord(s[j]) - 97] += 1
		if v[ord(s[j]) - 97] > 1:
			flag = 0
	if confere(v) and flag:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	s = str(input())
	if len(list(s)) != len(set(s)):
		print('No')
	else:
		s1 = 'abcdefghijklmnopqrstuvwxyz'
		s2 = ''.join(sorted(s))
		if s1.find(s2) == -1:
			print('No')
		else:
			print('Yes')


for _ in range(int(input())):
	data = list(input())

	def f(el):
		return ord(el)
	data.sort()
	setted = set(data)
	if len(setted) < len(data):
		print('NO')
		continue
	for i in range(len(data) - 1):
		if abs(ord(data[i]) - ord(data[i + 1])) > 1:
			print('NO')
			break
	else:
		print('YES')


for _ in range(int(input())):
	s = sorted(input())
	status = 0
	for i in range(len(s) - 1):
		if ord(s[i]) + 1 != ord(s[i + 1]):
			status = 1
	b = set(s)
	if len(b) != len(s):
		status = 1
	print('YNEOS'[status::2])


n = int(input())
for i in range(n):
	a = list(input())
	if len(a) > 26:
		print('NO')
	elif len(a) == 1:
		print('YES')
	else:
		a.sort()
		flag = True
		for j in range(1, len(a)):
			if ord(a[j]) - ord(a[j - 1]) != 1:
				flag = False
		if flag:
			print('Yes')
		else:
			print('NO')


from collections import defaultdict as DD
from bisect import bisect_left as BL
from bisect import bisect_right as BR
from itertools import combinations as IC
from itertools import permutations as IP
from random import randint as RI
import sys
MOD = pow(10, 9) + 7

def IN(f=0):
	if f == 0:
		return [int(i) for i in sys.stdin.readline().split()]
	else:
		return int(sys.stdin.readline())
nn = IN(1)
for _ in range(nn):
	s = input()
	s = list(s)
	s.sort()
	n = len(s)
	if len(set(s)) != n:
		print('No')
	else:
		f = 0
		for i in range(1, n):
			if abs(ord(s[i]) - ord(s[i - 1])) != 1:
				f = 1
		if f == 1:
			print('No')
		else:
			print('Yes')


def ii():
	return int(input())

def fi():
	return float(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def check_continuity(my_list):
	return all((a + 1 == b for (a, b) in zip(my_list, my_list[1:])))
n = ii()
for i in range(n):
	s = si()
	l = []
	s = ''.join(sorted(s))
	for i in range(len(s)):
		c = ord(s[i])
		l.append(c)
	l.sort()
	if check_continuity(l):
		print('YES')
	else:
		print('NO')


def mp():
	return map(int, input().split())
n = int(input())
for i in range(n):
	s = [i for i in input()]
	s.sort()
	c = [0] * 26
	for i in s:
		c[ord(i) - ord('a')] += 1
	fail = False
	for i in c:
		if i > 1:
			fail = True
	for i in range(len(s) - 1):
		if ord(s[i]) + 1 != ord(s[i + 1]):
			fail = True
	if fail:
		print('No')
	else:
		print('Yes')


from sys import stdin

def ip():
	return [int(i) for i in stdin.readline().split()]

def sp():
	return [str(i) for i in stdin.readline().split()]

def pp(A):
	for i in A:
		print(i)
aph = 'abcdefghijklmnopqrstuvwxyz'

def solve():
	s = str(input())
	s = ''.join(sorted(s))
	if s in aph:
		return 'Yes'
	else:
		return 'No'
t = int(input())
for _ in range(t):
	print(solve())


for _ in range(int(input())):
	l = []
	s = input()
	n = len(s)
	for x in s:
		l.append(int(ord(x)))
	if max(l) - min(l) + 1 == n and len(list(set(l))) == n:
		print('YES')
	else:
		print('NO')


test = int(input())
while test > 0:
	test -= 1
	s = input()
	l = sorted(s)
	check = ord(l[0])
	flag = 0
	for j in range(1, len(s)):
		if ord(l[j]) - check != j:
			flag = 1
			break
	if flag == 0:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	k = len(s)
	s = list(s)
	s.sort()
	s = ''.join(s)
	j = ''.join([chr(i) for i in range(ord(s[0]), ord(s[0]) + k)])
	if s == j:
		print('Yes')
	else:
		print('No')


x = int(input())
l = []
for i in range(x):
	l.append(input())
for i in l:
	ii = sorted(i) + [0]
	for j in range(len(ii) - 1):
		if ii[j] == ii[j + 1]:
			print('No')
			break
	else:
		for j in range(len(ii) - 2):
			if ord(ii[j]) != ord(ii[j + 1]) - 1:
				print('No')
				break
		else:
			print('Yes')


a = int(input())
for i in range(a):
	bb = input()
	table = {}
	mins = 99999999
	flag = 0
	for i in bb:
		if ord(i) - 48 in table:
			flag = 1
		table[ord(i) - 48] = 1
		if ord(i) - 48 < mins:
			mins = ord(i) - 48
	for i in bb:
		if ord(i) - 48 >= mins + len(bb):
			flag = 1
	if flag == 1:
		print('No')
	else:
		print('yes')


totalStrings = int(input())
for i in range(totalStrings):
	letters = [0] * 28
	word = str(input())
	start = 0
	end = 0
	for letter in word:
		letters[ord(letter) - 96] += 1
	for j in range(len(letters)):
		if letters[j] == 1:
			start = j
			break
	for j in range(start, len(letters)):
		if letters[j] == 0:
			end = j
			break
	if end - start == len(word):
		print('Yes')
	else:
		print('No')


n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	q = input()
	m = []
	for j in range(len(q)):
		m.append(q[j])
	m.sort()
	q = ''
	for j in range(len(m)):
		q += m[j]
	if s.find(q) != -1:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	S = list(input())
	if len(set(S)) != len(S):
		print('No')
	else:
		S.sort()
		f = True
		for i in range(1, len(S)):
			if ord(S[i]) - ord(S[i - 1]) != 1:
				f = False
				break
		if f:
			print('Yes')
		else:
			print('No')


n = int(input())
eng = 'abcdefghijklmnopqrstuvwxyz'
ans = []
for i in range(n):
	st = list(input())
	if len(set(st)) == len(st):
		st.sort()
		st = ''.join(st)
		if st in eng:
			ans.append('Yes')
		else:
			ans.append('No')
	else:
		ans.append('No')
for i in range(len(ans)):
	print(ans[i])


n = int(input())
for j in range(n):
	s = input()
	s = list(s)
	s.sort()
	a = 'Yes'
	for i in range(len(s) - 1):
		if ord(s[i]) - ord(s[i + 1]) != -1:
			a = 'No'
			break
	print(a)


def check(line):
	lst = sorted(line)
	last = -1
	for item in lst:
		if last != -1 and ord(item) != last + 1:
			return False
		last = ord(item)
	return True

def main():
	n_row = input()
	for _ in range(int(n_row)):
		line = input()
		if check(line):
			print('Yes')
		else:
			print('No')
main()


n = int(input())
for i in range(n):
	n = list(input())
	n.sort()
	s = list(set(n))
	s.sort()
	c = 0
	if s == n:
		for i in range(len(n) - 1):
			if ord(n[i + 1]) == ord(n[i]) + 1:
				c = c + 1
		if c == len(n) - 1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


x = int(input())
for i in range(x):
	s = input()
	s = sorted(list(s))
	u = 0
	for i in range(len(s) - 1):
		if s[i] == s[i + 1]:
			u = 1
			break
	if len(s) - 1 == ord(s[-1]) - ord(s[0]) and u == 0:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	a = list(s)
	b = set(a)
	if len(a) != len(b):
		print('No')
		continue
	a.sort()
	f = True
	for j in range(1, len(a)):
		if abs(ord(a[j]) - ord(a[j - 1])) > 1:
			f = False
			break
	if f:
		print('Yes')
	else:
		print('No')


import sys

def main():
	n = int(input())
	for i in range(n):
		s = input()
		a = []
		for j in range(len(s)):
			a.append(ord(s[j]))
		a.sort()
		f = False
		for k in range(len(s) - 1):
			if a[k + 1] - a[k] != 1:
				f = True
				break
		print('Yes' if not f else 'No')
	return
main()


n = int(input())
for _ in range(n):
	currString = str(input())
	if len(currString) > 26:
		print('NO')
		continue
	else:
		newArr = []
		for i in currString:
			newArr.append(ord(i))
		newArr = sorted(newArr)
		printed = False
		for i in range(len(currString) - 1):
			if newArr[i + 1] - newArr[i] > 1 or newArr[i + 1] == newArr[i]:
				print('NO')
				printed = True
				break
		if not printed:
			print('YES')


for i in range(int(input())):
	n = input()
	j = sorted(n)
	if len(n) == 1:
		print('YES')
	elif len(j) == len(n):
		for x in range(0, len(n) - 1):
			if ord(j[x + 1]) - ord(j[x]) == 1:
				pass
			else:
				print('NO')
				break
			if x == len(n) - 2:
				print('YES')
				break
	else:
		print('NO')


n = int(input())
for i in range(n):
	s = sorted(list(map(ord, input())))
	output = 'Yes'
	for i in range(len(s)):
		if s[i] != s[0] + i:
			output = 'No'
	print(output)


n = int(input())
for t in range(n):
	s = input().strip()
	s = sorted(s)
	for i in range(len(s) - 1):
		if ord(s[i + 1]) - ord(s[i]) != 1:
			print('NO')
			break
	else:
		print('YES')


t = int(input())
for _ in range(t):
	s = input()
	count = {}
	ispos = True
	for i in range(len(s)):
		count[s[i]] = count.get(s[i], 0) + 1
		if count[s[i]] > 1:
			ispos = False
			break
	if ispos == True:
		s = list(s)
		s.sort()
		isthere = True
		for i in range(len(s) - 1):
			if ord(s[i + 1]) - ord(s[i]) != 1:
				isthere = False
				break
		if isthere == True:
			print('yes')
		else:
			print('no')
	else:
		print('no')


t = int(input())
while t > 0:
	s = sorted(input())
	if len(set(s)) == len(s):
		if len(s) == 2:
			if ord(s[1]) - ord(s[0]) == 1:
				print('YES')
			else:
				print('NO')
		else:
			for i in range(0, len(s) - 1):
				if ord(s[i + 1]) - ord(s[i]) == 1:
					pass
				else:
					print('NO')
					break
			else:
				print('YES')
	else:
		print('NO')
	t -= 1


from string import ascii_lowercase
n = int(input())
for i in range(n):
	a = input()
	a = sorted(a)
	adj = 0
	unique = 1
	if len(a) > 1:
		for j in range(len(a) - 1):
			if a[j] == a[j + 1]:
				unique = 0
				break
		if ''.join(a) in ascii_lowercase and unique:
			print('Yes')
		else:
			print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	x = True
	s = list(input())
	s.sort()
	if len(s) != len(set(s)):
		x = False
	if x == True:
		for i in range(len(s) - 1):
			if ord(s[i + 1]) - ord(s[i]) != 1:
				x = False
	print('YES' if x == True else 'NO')


for i in range(int(input())):
	s = list(input())
	s.sort()
	f = 1
	for i in range(1, len(s)):
		if ord(s[i]) != ord(s[i - 1]) + 1:
			f = 0
			break
	if f == 1:
		print('Yes')
	else:
		print('No')


def f(a):
	for i in a:
		if a.count(i) == 1:
			continue
		else:
			return False
	return True

def differ(a):
	abc = 'abcdefghijklmnopqrstuvwxyz'
	b = []
	for i in a:
		b.append(abc.index(i))
	m = max(b)
	n = min(b)
	l = len(b)
	if m - n == l - 1 and f(b):
		print('Yes')
	else:
		print('No')
n = int(input())
for i in range(n):
	differ(input())


n = int(input())
while n:
	s = input()
	s = list(s)
	s.sort()
	s = ''.join(s)
	if s in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
	else:
		print('No')
	n -= 1


import math
n = input()
for nn in range(int(n)):
	s = input()
	s = list(s)
	s.sort()
	yes = 1
	for i in range(len(s) - 1):
		if ord(s[i]) != ord(s[i + 1]) - 1:
			yes = 0
			break
	if yes == 1:
		print('Yes')
	else:
		print('No')


n = int(input())
for z in range(0, n):
	arr = input()
	a = []
	for i in range(0, len(arr)):
		k = ord(arr[i]) - 97
		a.append(k)
	a.sort()
	b = True
	for i in range(0, len(a) - 1):
		if a[i] - a[i + 1] != -1:
			b = False
			break
	if b:
		print('Yes')
	else:
		print('No')


import string
a = string.ascii_lowercase
d = {}
for i in range(1, 27):
	d[a[i - 1]] = i
for _ in range(int(input())):
	w = list(input().strip())
	t = True
	st = 0
	if len(w) != len(set(w)):
		t = False
	else:
		n = len(w)
		w.sort()
		t = True
		for i in range(n - 1):
			if d[w[i + 1]] - d[w[i]] != 1:
				t = False
				break
	if t:
		print('Yes')
	else:
		print('No')


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST():
	return list(map(int, input().split()))

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7
N = INT()
for i in range(N):
	s = input()
	s2 = sorted(set(s))
	if len(s) != len(s2):
		No()
		continue
	if ord(s2[-1]) - ord(s2[0]) + 1 != len(s2):
		No()
		continue
	Yes()


testcases = int(input())
while testcases > 0:
	testcases -= 1
	str = input()
	arr = [0] * 26
	for a in str:
		arr[ord(a) - 97] = 1
	counter = 0
	for i in range(26):
		if arr[i] == 1:
			for j in range(i, 26):
				if arr[j] == 1:
					counter += 1
				else:
					break
			if counter == len(str):
				print('YES')
				break
			else:
				print('NO')
				break


n = int(input())
for _ in range(n):
	s = list(input())
	s.sort()
	ba = []
	if len(set(s)) == len(s):
		flag = 0
		for i in range(1, len(s)):
			if ord(s[i]) - ord(s[i - 1]) != 1:
				flag = 1
				break
		if flag == 0:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def checkValid(x):
	dic = {}
	flag = False
	if len(x) == 1:
		return 'Yes'
	for word in x:
		if word in dic:
			flag = True
			return 'No'
		else:
			dic[word] = 1
	x = list(x)
	x.sort()
	if flag is False:
		for i in range(len(x) - 1):
			if abs(ord(x[i + 1]) - ord(x[i])) != 1:
				return 'No'
	return 'Yes'
n = int(input())
for i in range(n):
	x = input()
	print(checkValid(x))


for _ in range(int(input())):
	string = input()
	l = list(string)
	s = set(l)
	if len(l) > len(s):
		print('No')
	else:
		k = []
		l.sort()
		w = [chr(x) for x in range(ord(l[0]), ord(l[0]) + len(l))]
		for i in range(len(l)):
			if l[i] == w[i]:
				k.append('True')
			else:
				k.append('False')
		if 'False' in k:
			print('No')
		else:
			print('Yes')


n = int(input())
for _ in range(n):
	s = input()
	chars = [ord(c) for c in s]
	chars.sort()
	flag = True
	last = chars[0]
	for num in chars[1:]:
		if num != last + 1:
			flag = False
			break
		last = num
	if flag:
		print('Yes')
	else:
		print('No')


n = int(input())
li = list()
for i in range(n):
	li.append(''.join(sorted(input())))
for i in li:
	a = True
	f = int(ord(i[0])) + len(i) - 1
	l = int(ord(i[-1]))
	if f == l:
		for j in i:
			if i.count(j) != 1:
				a = False
		print('Yes' if a else 'No')
	else:
		print('No')


def var(s):
	flags = [False] * 28
	dup = False
	base = ord('a')
	for c in s:
		ind = ord(c) - base + 1
		if flags[ind]:
			dup = True
		flags[ind] = True
	if dup:
		return False
	for (i, v) in enumerate(flags):
		if v:
			break
	flags = flags[i:]
	for (i, v) in enumerate(flags):
		if not v:
			break
	flags = flags[i:]
	return sum(flags) == 0
for _ in range(int(input())):
	print(('NO', 'YES')[var(input())])


n = int(input())
for i in range(n):
	p = list(input())
	if len(p) == len(set(p)):
		q = sorted(p, reverse=True)
		f = 0
		for j in range(1, len(p)):
			if chr(ord(q[0]) - j) in p:
				pass
			else:
				f = 1
		if f == 0:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


S = 'abcdefghijklmnopqrstuvwxyz'
for i in range(int(input())):
	s = input()
	if len(set(s)) == len(s):
		b = S.index(min(set(s)))
		ans = set(S[b:b + len(s)])
		if sorted(ans) == sorted(set(s)):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


for i in range(int(input())):
	ans = 'No'
	st = input()
	if len(st) != len(set(list(st))):
		ans = 'No'
	else:
		L = []
		for j in range(97, 97 + 26):
			if chr(j) in st:
				L.append(j)
		L.sort()
		if max(L) - len(L) + 1 == min(L):
			ans = 'Yes'
	print(ans)


n = int(input())
for i in range(n):
	s = list(map(ord, input().strip()))
	lol = 0
	s.sort()
	a = s[0]
	for i in range(1, len(s)):
		if abs(a - s[i]) != 1:
			lol = 1
			break
		a = s[i]
	if lol == 1:
		print('No')
	else:
		print('Yes')


a = int(input())
for q in range(a):
	r = input()
	r = sorted(r)
	k = True
	for w in range(len(r) - 1):
		if ord(r[w]) + 1 != ord(r[w + 1]):
			k = False
			print('No')
			break
	if k:
		print('Yes')


from string import ascii_lowercase
n = int(input())
for i in range(n):
	string = input()
	data = sorted([ascii_lowercase.index(i) for i in string])[::-1]
	if len(set(string)) == len(string) and all([data[i] - data[i + 1] == 1 for i in range(len(string) - 1)]):
		print('Yes')
		continue
	print('No')


n = int(input())
while n:
	s = list(input())
	s.sort()
	a = set(s)
	l = len(s)
	if l == 1:
		print('Yes')
		k = 1
	elif len(a) != l:
		k = 1
		print('No')
	else:
		k = 0
		for i in range(l - 1):
			if ord(s[i]) + 1 == ord(s[i + 1]):
				k += 1
		if k != l - 1:
			print('No')
		else:
			print('Yes')
	n -= 1


n = int(input())
for i in range(n):
	s = sorted([i for i in input()])
	print('yEs' if len(set(s)) == len(s) and ord(s[-1]) - ord(s[0]) == len(s) - 1 else 'nO')


n = int(input())
for j in range(n):
	s = list(input())
	c = 0
	s = sorted(s)
	b = True
	for i in range(len(s) - 1):
		if s.count(s[i]) > 1:
			print('No')
			b = False
			break
		elif ord(s[i]) + 1 == ord(s[i + 1]):
			c = c + 1
	if b:
		if c == len(s) - 1:
			print('Yes')
		else:
			print('No')


n = int(input())
ans = []
for i in range(n):
	s = input()
	s_sorted = sorted(s)
	f = True
	for j in range(len(s_sorted) - 1):
		if ord(s_sorted[j]) + 1 != ord(s_sorted[j + 1]):
			ans.append('No')
			f = False
			break
	if f:
		ans.append('Yes')
for i in ans:
	print(i)


n = int(input())
for i in range(n):
	s = input()
	d = []
	f = True
	for i in s:
		d.append(ord(i))
	d.sort()
	for i in range(len(d) - 1):
		if d[i] == d[i + 1] - 1:
			f = True
		else:
			f = False
			break
	if f:
		print('Yes')
	else:
		print('No')


t = int(input(''))
while t > 0:
	t -= 1
	s = input('')
	ans = 1
	a = []
	for i in range(len(s)):
		a.append(ord(s[i]))
	for i in range(26):
		c = a.count(i + 97)
		if c > 1:
			ans = 0
			break
	a.sort()
	for i in range(len(a) - 1):
		if a[i + 1] != a[i] + 1:
			ans = 0
			break
	if ans == 1:
		print('Yes')
	else:
		print('No')


for j in range(int(input())):
	s = list(input())
	s.sort()
	if all((ord(s[i + 1]) - ord(s[i]) == 1 for i in range(len(s) - 1))) and all((s[x] != s[x + 1] for x in range(len(s) - 1))):
		print('YES')
	else:
		print('NO')


from os import path
import sys
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def solve():
	for _ in range(ii()):
		s = list(si())
		s.sort()
		f = 0
		n = len(s)
		for i in range(1, n):
			x = ord(s[i]) - ord('a')
			y = ord(s[i - 1]) - ord('a')
			if x != y + 1:
				f = 1
				break
		print('YES' if f == 0 else 'NO')
solve()


n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
for k in range(n):
	L = sorted([k for k in input()])
	s1 = ''.join(L)
	print(['No', 'Yes'][s1 in s])


n = 0
n = int(input())
for j in range(n):
	sum = b = z = 0
	a = input()
	b = sorted(a)
	z = len(b)
	for i in range(1, z):
		if b[i] == b[i - 1]:
			sum += -1000
		else:
			sum += ord(b[i]) - ord(b[i - 1])
	if sum == z - 1:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	s_list = list(s)
	s_list.sort()
	flag = True
	if len(set(s_list)) != len(s):
		flag = False
	for i in range(1, len(s)):
		ch = s_list[i]
		if ord(ch) < ord('a') or ord(ch) > ord('z'):
			flag = False
			break
		if ord(ch) != ord(s_list[i - 1]) + 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


T = int(input())
for t in range(T):
	s = input()
	if ''.join(sorted(list(s))) in 'abcdefghijklmnopqrstuvwxyz':
		print('Yes')
	else:
		print('No')


import string
import sys
lines = int(input().strip())
inp = list(map(sorted, map(str.strip, sys.stdin.readlines())))
alpha = string.ascii_lowercase
for i in range(lines):
	if ''.join(inp[i]) in alpha:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input().strip()
	ok = 1
	s = sorted(s)
	for i in range(len(s) - 1):
		if ord(s[i + 1]) - ord(s[i]) != 1:
			ok = 0
	if ok:
		print('Yes')
	else:
		print('No')


import sys, math, queue
sys.setrecursionlimit(1000000)
for i in range(int(input())):
	x = []
	s = input()
	for c in s:
		x.append(ord(c))
	x.sort()
	ans = 'Yes'
	for i in range(1, len(x)):
		if x[i] != x[i - 1] + 1:
			ans = 'No'
			break
	print(ans)


from collections import Counter
n = int(input())
alph = list('abcdefghijklmnopqrstuvwxyz')
for i in range(n):
	a = input()
	maxcnt = 0
	for j in a:
		cnt = a.count(j)
		if cnt > maxcnt:
			maxcnt = cnt
	if len(a) == 1:
		print('Yes')
	elif maxcnt > 1:
		print('No')
	else:
		check = True
		ind = alph.index(max(a))
		for l in alph[ind + 1 - len(a):ind + 1]:
			if l not in a:
				check = False
				break
		if check:
			print('Yes')
		else:
			print('No')


n = int(input())
r = []
for i in range(n):
	mas = input()
	sum = [ord(mas[0])]
	for i in range(1, len(mas)):
		sum.append(ord(mas[i]))
	sum.sort()
	f = True
	for i in range(1, len(sum)):
		if sum[i] - sum[i - 1] != 1:
			f = False
			break
	if f:
		r.append('Yes')
	else:
		r.append('No')
for i in r:
	print(i)


n = int(input())
for i in range(n):
	segment = {}
	string = input()
	alphabet = [0 for x in range(ord('a'), ord('z') + 1)]
	for i in range(0, len(string)):
		alphabet[ord(string[i]) - ord('a')] += 1
	start = -1
	end = -1
	has_more = False
	for i in range(len(alphabet)):
		if alphabet[i] > 1:
			has_more = True
		if start == -1 and alphabet[i] == 1:
			start = i
		if start != -1:
			end = i
			segment[start] = end
		if alphabet[i] == 0:
			start = -1
			end = -1
	print('Yes' if len(segment) == 1 and (not has_more) else 'No')


t = int(input())
while t:
	st = input()
	k = len(st)
	flag = 0
	if k == 1:
		print('Yes')
	else:
		st = list(st)
		st = sorted(st)
		ma = ord(st[0])
		for i in range(1, k):
			if ord(st[i]) == ma + 1:
				ma = ord(st[i])
				flag = 0
			else:
				flag = 1
				break
		if flag == 0:
			print('Yes')
		else:
			print('No')
	t = t - 1


import math
for tt in range(int(input())):
	s = input()
	n = len(s)
	s = list(s)
	s.sort()
	a = 0
	if len(list(set(s))) != n:
		print('NO')
	else:
		for i in range(1, n):
			if ord(s[i]) - ord(s[i - 1]) != 1:
				a = 1
				break
		if a:
			print('NO')
		else:
			print('YES')


n = int(input())
for y in range(0, n):
	S = 'abcdefghijklmnopqrstuvwxyz'
	s = input()
	s = sorted(s)
	s1 = list(set(s))
	status = 0
	for i in s1:
		if s.count(i) > 1:
			print('NO')
			status = 1
		if status == 1:
			break
	if status == 0:
		a0 = s[0]
		i = S.index(a0)
		k = len(s)
		for x in range(i, i + k):
			if S[x] in s:
				s.remove(S[x])
		if len(s) == 0:
			print('YES')
		else:
			print('NO')


for _ in range(int(input())):
	s = list(input())
	s.sort()
	work = True
	for i in range(1, len(s)):
		if ord(s[i]) - ord(s[i - 1]) != 1:
			work = False
			break
	if work:
		print('Yes')
	else:
		print('No')


n = int(input())

def check(s):
	prev = s[0]
	d = dict()
	for i in s:
		d[i] = 0
	for i in s:
		d[i] += 1
	if max(d.values()) > 1:
		return False
	if len(s) == 1:
		return True
	s = list(s)
	s.sort()
	for i in range(1, len(s)):
		if ord(s[i]) - ord(s[i - 1]) != 1:
			return False
	return True
for i in range(n):
	s = input()
	if check(s):
		print('Yes')
	else:
		print('No')


inp = int(input())

def check(str0):
	if len(str0) == 1:
		return 'Yes'
	else:
		b = sorted(str0)
		for j in range(len(b) - 1):
			if not ord(b[j + 1]) == ord(b[j]) + 1:
				return 'No'
		return 'Yes'
for i in range(inp):
	str0 = input()
	print(check(str0))


for i in range(int(input())):
	s = list(input())
	s.sort()
	x = ord(s[0])
	flag = 0
	for j in range(len(s)):
		if ord(s[j]) != x + j:
			flag = 1
			print('NO')
			break
	if flag == 0:
		print('YES')


def parse_arr():
	return list(map(int, input().split(' ')))
n = int(input())
for _ in range(n):
	line = input().strip()
	line = sorted(line)
	start = line[0]
	done = False
	for a in line:
		if a == start:
			start = chr(ord(start) + 1)
		else:
			print('No')
			done = True
			break
	if not done:
		print('Yes')


M = []
n = int(input())

def fonction(s):
	if len(s) == 1:
		return 'YES'
	else:
		s = ''.join(sorted(list(s)))
		test = True
		i = 0
		while test == True and i <= len(s) - 2:
			test = ord(s[i + 1]) - ord(s[i]) == 1
			i += 1
		if test == False:
			return 'NO'
		else:
			return 'YES'
for i in range(n):
	s = input()
	M.append(fonction(s))
for k in M:
	print(k)


n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
while n > 0:
	ss = input()
	c = ''.join(sorted(ss))
	if c in s:
		print('Yes\n')
	else:
		print('No\n')
	n -= 1


n = int(input())
out = []
for i in range(n):
	st = list(input())
	if len(st) != len(set(st)):
		out.append('no')
	else:
		st.sort()
		for j in range(len(st) - 1):
			if ord(st[j + 1]) - ord(st[j]) != 1:
				out.append('no')
				break
		else:
			out.append('yes')
for i in out:
	print(i)


import string
for _ in range(int(input())):
	temp = list(string.ascii_lowercase)
	n = sorted(input())
	if list(temp[temp.index(n[0]):temp.index(n[0]) + len(n)]) == n:
		print('Yes')
	else:
		print('No')


import re
num = input()
nums = []
for i in range(int(num)):
	string = input()
	nums.append(string)
for i in range(int(num)):
	flag = 1
	sortedNum = sorted(nums[i])
	if len(sortedNum) == 1:
		print('Yes')
		continue
	for j in range(0, len(sortedNum) - 1):
		temp1 = ord(sortedNum[j]) + 1
		temp2 = ord(sortedNum[j + 1])
		if temp1 == temp2:
			flag = 1
		else:
			flag = 0
			break
	if flag == 1:
		print('Yes')
	else:
		print('No')


n = int(input())
res = []
for i in range(n):
	slov = list(input())
	k = False
	slov.sort()
	for j in range(len(slov) - 1):
		ord2 = ord(slov[j + 1])
		ord1 = ord(slov[j])
		if ord2 - ord1 > 1 or ord2 == ord1:
			k = True
			break
	if k == True:
		res.append('NO')
	else:
		res.append('YES')
for r in res:
	print(r)


numero = int(input())
alfabeto = []
for i in range(26):
	alfabeto.append(0)

def zera():
	for i in range(26):
		alfabeto[i] = 0
for i in range(numero):
	palavra = input()
	palavra = sorted(palavra)
	for j in range(len(palavra)):
		alfabeto[ord(palavra[j]) - 97] += 1
	for j in range(len(palavra) - 1):
		if alfabeto[ord(palavra[j]) - 97] != 1:
			print('No')
			break
		if ord(palavra[j + 1]) - ord(palavra[j]) != 1:
			print('No')
			break
	else:
		print('Yes')
	zera()


n = int(input())
for _ in range(n):
	s = input().strip()
	L = list(s)
	S = set(L)
	if len(S) == len(L):
		L.sort()
		flag = 0
		for i in range(1, len(L)):
			o1 = ord(L[i])
			o2 = ord(L[i - 1])
			diff = abs(o1 - o2)
			if diff == 1:
				continue
			else:
				flag = 1
				break
		if flag == 0:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n: int = int(input())
while n > 0:
	n -= 1
	s: str = input()
	s = sorted(s)
	good: bool = True
	for i in range(len(s)):
		if ord(s[i]) != ord(s[0]) + i:
			good = False
	if good:
		print('Yes')
	else:
		print('No')


n = int(input())
l = []
for i in range(n):
	w = list(input())
	l.append(w)
alpha = 'a'
d = []
for i in range(0, 26):
	d.append(alpha)
	alpha = chr(ord(alpha) + 1)
for i in range(n):
	k = []
	for j in range(len(l[i])):
		k.append(d.index(l[i][j]))
	k.sort()
	count = 0
	plus = 0
	for s in range(len(k) - 1):
		if k[s + 1] - k[s] == 1:
			count += 1
		else:
			plus += 1
	if count == len(k) - 1:
		print('YES')
	else:
		print('NO')


import string
T = int(input())
for _T in range(T):
	s = input()
	if len(s) != len(set(s)):
		print('no')
		continue
	s = ''.join(sorted(list(s)))
	if s in string.ascii_lowercase:
		print('yes')
	else:
		print('no')


n = int(input())
for _ in range(n):
	dic = []
	a = input()
	b = sorted(a)
	f = 0
	for i in b:
		if i not in dic:
			dic.append(i)
		else:
			f = 1
			break
	for i in range(1, len(b)):
		if ord(b[i]) - ord(b[i - 1]) != 1:
			f = 1
			break
	if f == 1:
		print('No')
		continue
	print('Yes')


n = int(input())
for i in range(n):
	flag = 0
	a = input()
	c = []
	for j in a:
		c.append(ord(j))
	c.sort()
	for j in range(1, len(a)):
		if c[j] != c[j - 1] + 1:
			flag = -1
			break
		else:
			flag = 0
			continue
	if flag == 0 and len(c) == len(set(c)):
		print('Yes')
	else:
		print('No')


def isDiverse(S):
	L = sorted(S)
	L1 = []
	for (i, s) in enumerate(L):
		L1.append(ord(s))
		if not i:
			continue
		if L1[i] - L1[i - 1] != 1:
			return 'No'
	return 'Yes'
n = int(input())
for _ in range(n):
	S = list(input().rstrip())
	print(isDiverse(S))


def loru(s):
	cs = [0 for i in range(27)]
	for i in range(len(s)):
		cs[ord(s[i]) - 96] += 1
	ans = 'No'
	for i in range(1, 27):
		if cs[i] == 1:
			almost = 0
			for j in range(i, min(27, i + len(s))):
				if cs[j] == 1:
					almost += 1
				else:
					break
			if almost == len(s):
				ans = 'Yes'
				return ans
	return ans
t = int(input())
for i in range(t):
	s = input()
	print(loru(s))


TN = int(input())

def solution():
	s = sorted(list(input()))
	n = len(s)
	ans = 'Yes'
	for i in range(n - 1):
		if ord(s[i + 1]) - ord(s[i]) != 1:
			ans = 'No'
	print(ans)
while TN != 0:
	solution()
	TN -= 1


n = int(input())
for i in range(n):
	s = input()
	l = list(sorted(list(s)))
	flag = 0
	if len(l) == 1:
		print('Yes')
	else:
		for j in range(len(l) - 1):
			if ord(l[j + 1]) - ord(l[j]) == 1:
				flag = 1
			else:
				flag = 0
				break
		if flag == 1:
			print('Yes')
		else:
			print('No')


for _ in range(int(input())):
	s = sorted(list(input()))
	s = ''.join((x for x in s))
	if s in 'abcdefghijklmnopqrstuvwxyz' and len(s) <= 26:
		print('yes')
	else:
		print('no')


n = int(input())
for i in range(n):
	str = input()
	l = list(str)
	l.sort()
	flag = False
	for j in range(len(str) - 1):
		if ord(l[j + 1]) != 1 + ord(l[j]):
			flag = True
			break
	if flag != True:
		print('Yes')
	else:
		print('No')


n = int(input())

def sos(n):
	alp = 'abcdefghijklmnopqrstuvwxyz'
	alp1 = alp[::-1]
	b = sorted(list(n))
	c = ''
	for elem in b:
		c += elem
	if c in alp:
		return True
	return False
for i in range(n):
	a = input()
	b = sorted(list(a))
	c = set(b)
	d = sorted(list(c))
	if b == d and sos(a) or len(a) == 1:
		print('Yes')
	else:
		print('No')


from sys import stdin

def answer(s):
	if len(s) == 1:
		return 'Yes'
	else:
		s.sort()
		count = 1
		for i in range(1, len(s)):
			if ord(s[i]) - ord(s[i - 1]) == 1:
				count += 1
		if count == len(s):
			return 'Yes'
		else:
			return 'No'
n = int(stdin.readline().strip())
for i in range(n):
	s = list(stdin.readline().strip())
	p = answer(s)
	print(p)


def isDiverseString(s):
	if len(s) > 26:
		return False
	first = 26
	count = [0] * 26
	for char in s:
		count[ord(char) - ord('a')] += 1
		if ord(char) - ord('a') < first:
			first = ord(char) - ord('a')
	for i in range(first, len(s) + first):
		if i > 25 or count[i] != 1:
			return False
	return True
for _ in range(int(input())):
	print('Yes' if isDiverseString(input()) else 'No')


from string import ascii_lowercase as alphabet

def is_diverse(s: str) -> bool:
	chars = [c for c in s]
	char_dict = dict.fromkeys(chars)
	if len(char_dict) < len(s):
		return False
	chars.sort()
	sorted_s = ''.join(chars)
	return sorted_s in alphabet

def main():
	for _ in range(int(input())):
		print('Yes' if is_diverse(input()) else 'No')
main()


def min_index(a):
	minimum = 25
	min_ind = 0
	for i in range(len(a)):
		if alphabet.index(a[i]) < minimum:
			minimum = alphabet.index(a[i])
			min_ind = i
	return min_ind

def sort_in_alphabet(a):
	result = ''
	while a != '':
		min_el = min_index(a)
		result += a[min_el]
		a = a[:min_el] + a[min_el + 1:]
	return result

def check(a):
	valid = True
	for i in range(1, len(a)):
		if a[i] == a[i - 1]:
			valid = False
			break
	return valid
alphabet = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
for i in range(n):
	valid = True
	s = sort_in_alphabet(input())
	if check(s):
		for j in range(1, len(s)):
			if alphabet.index(s[j]) - alphabet.index(s[j - 1]) != 1:
				valid = False
	else:
		valid = False
	if valid:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	s = input()
	a = {}
	f = 0
	for c in s:
		if c not in a:
			a[c] = 1
		else:
			f = 1
			break
	if f == 0:
		l = list(a.keys())
		l.sort()
		for j in range(1, len(l)):
			if ord(l[j]) - ord(l[j - 1]) > 1:
				f = 1
				break
	if f == 0:
		print('Yes')
	else:
		print('No')


a = int(input())
for i in range(a):
	s = input()
	w = 0
	b = sorted(s)
	for j in range(len(s) - 1):
		if b[j] == b[j + 1]:
			w += 1
	else:
		c = ord(b[0])
		d = ord(b[-1])
		e = d - c
		f = len(s) - 1
		if f == e and w <= 0:
			print('Yes')
		else:
			print('No')


n = int(input())
k1 = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	k = input()
	h = sorted(k)
	h = ''.join(h)
	print(['No', 'Yes'][h in k1])


def main():
	n = int(input())
	for i in range(n):
		r = input()
		d = [ord(c) for c in r]
		d.sort()
		ok = True
		for j in range(len(d) - 1):
			if d[j] + 1 != d[j + 1]:
				ok = False
		print('YES' if ok else 'NO')
main()


q = int(input())
for i in range(q):
	foo = False
	s = input()
	s = list(s)
	s.sort()
	for i in range(len(s) - 1):
		if ord(s[i + 1]) - ord(s[i]) != 1:
			foo = True
	if foo:
		print('nO')
	else:
		print('YeS')


n = int(input())
v = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	a = list(input())
	a.sort()
	z = ''.join(a)
	if z in v:
		print('YES')
	else:
		print('NO')


t = int(input())
for items in range(t):
	string = input()
	if len(set(string)) == len(string) and ord(min(string)) + (len(string) - 1) == ord(max(string)):
		print('YES')
	else:
		print('NO')


import math as mt
import sys, string, bisect
input = sys.stdin.readline
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
a = 'abcdefghijklmnopqrstuvwxyz'
n = I()
for i in range(n):
	k = [d for d in input().strip()]
	k.sort()
	s = ''
	for _ in k:
		s += _
	if a.count(s) == 1:
		print('Yes')
	else:
		print('No')


q = int(input())
for i in range(q):
	s = input()
	L = list(s)
	L.sort()
	for j in range(len(L)):
		if ord(L[j]) == ord(L[0]) + j:
			continue
		else:
			print('No')
			break
	else:
		print('Yes')


num = input()
num = int(num)
outlist = ['No'] * num
for i in range(0, num):
	x = input()
	setx = {n for n in x}
	setx = sorted(list(setx))
	if len(x) == len(setx):
		if ord(setx[len(setx) - 1]) - ord(setx[0]) == len(setx) - 1:
			outlist[i] = 'Yes'
for i in range(0, num):
	print(outlist[i])


for _ in range(int(input().strip())):
	s = input()
	s = ''.join(sorted(s))
	flag = True
	for i in range(1, len(s)):
		if ord(s[i]) - ord(s[i - 1]) != 1:
			flag = False
			break
	if flag:
		print('Yes')
	else:
		print('No')


def solve(s):
	s = sorted(list(s))
	for i in range(1, len(s)):
		if ord(s[i - 1]) + 1 != ord(s[i]):
			return 'No'
	return 'Yes'

def main():
	for _ in range(int(input())):
		print(solve(input()))
main()


import sys
from bisect import bisect_left, bisect_right
from collections import deque
inf = float('inf')
mod = 1000000007

def binary(number):
	result = 0
	while number:
		result = result + 1
		number = number & number - 1
	return result

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())
n = int(input())
while True:
	try:
		s = input()
		last = None
		ret = True
		s_ = sorted(s)
		s_set = set(list(s_))
		if len(s_set) != len(s_):
			print('No')
			continue
		for x in s_:
			if last:
				if abs(ord(x) - last) != 1:
					ret = False
					break
				else:
					last = ord(x)
			else:
				last = ord(x)
		if ret:
			print('Yes')
		else:
			print('No')
	except:
		break


import sys
n = int(sys.stdin.readline().strip())
for _ in range(n):
	cnt = 0
	s = sys.stdin.readline().strip()
	e = sorted(s)
	lens = len(e)
	for i in range(1, lens):
		if ord(e[i - 1]) + 1 != ord(e[i]):
			print('No')
			cnt = 1
			break
	if cnt != 1:
		print('Yes')


for _ in range(int(input())):
	k = 'abcdefghijklmnopqrstuvwxyz'
	a = str(input())
	b = sorted(a)
	s = str('')
	for x in b:
		s = s + x
	if k.find(s) != -1:
		print('YES')
	else:
		print('NO')


n = int(input())
alpha = ''.join(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'])
for i in range(n):
	flag = False
	lst = ''.join(sorted(list(input())))
	fnd = alpha.index(lst[0])
	if lst in alpha:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(0, n):
	s1 = input()
	split_s1 = list(s1)
	if len(split_s1) != len(list(set(s1))):
		print('No')
	else:
		flag = 0
		s1_sorted = ''.join(sorted(s1))
		for j in range(0, len(s1_sorted) - 1):
			if ord(s1_sorted[j + 1]) != ord(s1_sorted[j]) + 1:
				print('No')
				flag = 1
				break
		if flag == 0:
			print('Yes')


def is_diverse(s):
	(n, A) = (len(s), set(s))
	if len(A) < n:
		return False
	return ord(max(A)) - ord(min(A)) + 1 == n
for _ in range(int(input())):
	print('Yes' if is_diverse(input()) else 'No')


for i in range(int(input())):
	word = input()
	word = sorted(word)
	if len(set(word)) != len(word):
		print('No')
		continue
	if ord(word[-1]) - ord(word[0]) + 1 != len(word):
		print('No')
	else:
		print('Yes')


t = int(input())
for i in range(t):
	s = list(input())
	s.sort()
	flag = True
	for j in range(len(s) - 1):
		if abs(ord(s[j + 1]) - ord(s[j])) != 1:
			flag = False
			break
	if flag:
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	a = list(input())
	l = []
	if len(a) == 1:
		print('YES')
	else:
		for j in a:
			l.append(ord(j))
		l.sort()
		x = min(l)
		for p in range(len(l)):
			if l[p] != x + p:
				print('NO')
				break
		else:
			print('YES')


def razn_cf():
	n = int(input())
	for nn in range(n):
		alp = 'abcdefghijklmnopqrstuvwxyz'
		alpl = list(alp)
		s = input()
		p = alp.find(''.join(sorted(list(s))))
		if p == -1:
			print('No')
			continue
		t = True
		for i in range(len(s) - 1):
			try:
				f = alpl.index(s[i])
			except ValueError:
				print('No')
				t = False
				break
			del alpl[f]
		if t:
			print('Yes')
	exit()
print(razn_cf())


n = int(input())
for i in range(n):
	flag = 0
	x = input()
	y = set(x)
	if len(x) != len(y):
		print('NO')
	else:
		y = list(y)
		y.sort()
		for j in range(len(y) - 1):
			if ord(y[j]) + 1 != ord(y[j + 1]):
				print('NO')
				flag = 1
				break
		if flag == 0:
			print('YES')


n = int(input())
alpha = 'abcdefghijklmnopqrstuvwxyz'
for t in range(n):
	a = input()
	c = ''.join(sorted(a))
	for i in range(len(a)):
		for j in range(len(alpha)):
			if c[i] == alpha[j]:
				index = j
				break
		break
	flag = True
	index_of_c = 0
	index_of_al = index
	if len(alpha) - index_of_al >= len(c):
		while index_of_al < len(alpha) and index_of_c < len(c):
			if c[index_of_c] != alpha[index_of_al]:
				flag = False
				print('No')
				break
			else:
				index_of_c += 1
				index_of_al += 1
	else:
		print('No')
		flag = False
	if flag == True:
		print('Yes')


n = int(input())
for _ in range(n):
	l = input()
	l = list(l)
	l = list(map(ord, l))
	l.sort()
	l = list(map(lambda x: x - l[0], l))
	test = list(range(len(l)))
	if l != test:
		print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	s = input()
	s = sorted(s)
	l = []
	length = len(s)
	for j in range(length):
		l.append(ord(s[j]) - ord(s[0]))
	if l == [i for i in range(length)]:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	a = input()
	s = sorted(list(a))
	chk = False
	for j in range(len(s) - 1):
		if ord(s[j + 1]) - ord(s[j]) != 1:
			chk = True
			break
	if len(s) != len(set(s)):
		chk = True
	print('Yes' if not chk else 'No')


for _ in range(int(input())):
	s = sorted(input())
	a = set()
	f = 0
	for i in range(0, len(s) - 1):
		if abs(ord(s[i]) - ord(s[i + 1])) == 1 and s[i] not in a:
			a.add(s[i])
		else:
			f = 1
			break
	if f == 1:
		print('No')
	else:
		print('Yes')


def f():
	if len(set(s)) < len(s):
		return 'No'
	for i in range(ord(s[0]), ord(s[-1]) + 1):
		if s[i - ord(s[0])] != chr(i):
			return 'No'
	return 'Yes'
for i in range(int(input())):
	s = list(input())
	s.sort()
	print(f())


mod = 10 ** 9 + 7
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
n = ii()
for i in range(n):
	s = sorted(list(si()))
	x = len(s)
	flg = 0
	for j in range(1, x):
		if ord(s[j]) - ord(s[j - 1]) != 1:
			flg = 1
	print('YNeos'[flg == 1::2])


n = int(input())
for i in range(n):
	diverso = True
	aux = []
	string = input()
	for s in string:
		aux.append(ord(s))
	aux.sort()
	for j in range(1, len(aux)):
		if aux[j] != aux[j - 1] + 1:
			diverso = False
			break
	if not diverso:
		print('NO')
	else:
		print('YES')


n = int(input())
for i in range(n):
	a = input()
	l = len(a)
	if l == 1:
		print('Yes')
	else:
		k = 0
		j = 0
		while k < l:
			if a.count(a[j]) > 1 or abs(ord(a[j]) - ord(a[0]) >= l):
				print('No')
				break
			elif chr(ord(a[j]) - 1) in a:
				k += 1
			elif chr(ord(a[j]) + 1) in a:
				k += 1
			else:
				print('No')
				break
			j += 1
		if k == l:
			print('Yes')


test_cases = int(input())
for test in range(test_cases):
	word = input()
	letters = sorted(word)
	letter = ord(letters[0])
	div = True
	for i in range(1, len(letters)):
		if ord(letters[i]) != letter + i:
			div = False
	if div == True:
		print('Yes')
	else:
		print('No')


n = int(input())
al = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	a = ''.join(sorted(list(input())))
	if a in al:
		print('yes')
	else:
		print('no')


def consecutive(word):
	word = sorted(word)
	for i in range(len(word) - 1):
		if ord(word[i]) != ord(word[i + 1]) - 1:
			return False
	return True
n = int(input())
for i in range(n):
	word = input()
	if len(set(word)) == len(word) and consecutive(word):
		print('Yes')
	else:
		print('No')


def main():
	for _ in range(int(input())):
		s = input()
		if len(s) == len(set(s)):
			s = list(s)
			s = [ord(i) for i in sorted(s)]
			f = 1
			for i in range(1, len(s)):
				if s[i] - s[i - 1] != 1:
					f = 0
					break
			if f:
				print('Yes')
			else:
				print('No')
		else:
			print('No')
	return 0
main()


n = int(input())
for _ in range(n):
	s = sorted(input())
	ss = set(map(lambda x, y: ord(y) - ord(x), s, s[1:]))
	if ss == set([1]) or not ss:
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	arr = input()
	k = len(set(arr))
	n = len(arr)
	if k != n:
		print('No')
	elif len(arr) == 1:
		print('Yes')
	else:
		flag = False
		arr = sorted(arr)
		for i in range(n - 1):
			if abs(ord(arr[i + 1]) - ord(arr[i])) == 1:
				flag = True
			else:
				flag = False
				break
		if flag:
			print('Yes')
		else:
			print('No')


t = int(input())
while t:
	t = t - 1
	s = input()
	l = []
	f = 0
	if len(s) > 26:
		print('No')
	else:
		for w in s:
			l.append(ord(w))
		l = sorted(l)
		(a, b) = (min(l), max(l))
		for i in range(1, len(l), 1):
			if l[i] - l[i - 1] != 1:
				f = 1
				print('No')
				break
		if f == 0:
			print('Yes')


for _ in range(int(input())):
	s1 = input()
	s = [x for x in s1]
	s.sort()
	c = ord(s[0])
	flag = 0
	for x in range(len(s)):
		if ord(s[x]) == int(c):
			c += 1
			continue
		else:
			flag = 1
			break
	if flag == 1:
		print('No')
	else:
		print('Yes')


def consec(string):
	string = ''.join(sorted(string))
	for i in range(len(string) - 1):
		if abs(ord(string[i]) - ord(string[i + 1])) > 1:
			return False
	return True
letters = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
it = 0
while it < n:
	string = str(input().lower())
	if len(string) > 26:
		print('No')
		it += 1
	elif consec(string):
		total = 0
		for l in letters:
			count = string.count(l)
			if count > 1:
				total += count
		if total > 0:
			print('No')
		else:
			print('Yes')
		it += 1
	else:
		print('No')
		it += 1


from collections import deque, Counter, OrderedDict
from heapq import nsmallest, nlargest
from math import ceil, floor, log, log2, sqrt, gcd, factorial

def binNumber(n, size=1):
	return bin(n)[2:].zfill(size)

def iar():
	return list(map(int, input().split()))

def ini():
	return int(input())

def isp():
	return map(int, input().split())

def sti():
	return str(input())
n = ini()
for i in range(n):
	s = input()
	x = ''.join(sorted(s))
	f = 1
	for j in range(len(s) - 1):
		if ord(x[j]) + 1 != ord(x[j + 1]):
			f = 0
	if f == 1:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	a = input()
	b = [0 for j in range(26)]
	for j in a:
		b[ord(j) - 97] += 1
	y = 0
	x = 0
	b.append(0)
	for i in b:
		if i > 1:
			print('No')
			break
		if y == 0 and i == 1:
			y = 1
		if y == 1 and i == 0:
			x = 1
			y = 0
		if x == 1 and i >= 1:
			print('No')
			break
	else:
		print('Yes')


n = int(input().strip())
for _ in range(n):
	s = input().strip()
	uq = set(s)
	if len(s) != len(uq):
		print('no')
	else:
		mn = ord(min(uq))
		nums = map(lambda c: ord(c) - mn + 1, uq)
		if sum(nums) != 1 / 2 * len(uq) ** 2 + 1 / 2 * len(uq):
			print('no')
		else:
			print('yes')


N = int(input())
for i in range(N):
	st = input()
	st = ''.join(sorted(st))
	for ind in range(0, len(st) - 1):
		if abs(ord(st[ind]) - ord(st[ind + 1])) != 1:
			print('No')
			break
	else:
		print('Yes')


n = int(input())
alpha = 'abcdefghijklmnopqrstuvwxyz'
N = 0
for i in range(n):
	w = sorted(input())
	start = alpha.index(w[0])
	for j in range(1, len(w)):
		if alpha.index(w[j]) - alpha.index(w[j - 1]) != 1:
			print('No')
			break
	else:
		print('Yes')


import sys
from string import ascii_lowercase as al
sys.setrecursionlimit(10 ** 5 + 1)
inf = int(10 ** 20)
max_val = inf
min_val = -inf
RW = lambda : sys.stdin.readline().strip()
RI = lambda : int(RW())
RMI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
RWI = lambda : [x for x in sys.stdin.readline().strip().split()]
nb_test = RI()
for _ in range(nb_test):
	ins = ''.join(sorted(input()))
	print(['No', 'Yes'][ins in al])


from collections import defaultdict

def fun(string):
	l = len(string)
	fre = [0] * 26
	array = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
	d = defaultdict(int)
	s = 'abcdefghijklmnopqrstuvwxyz'
	for i in range(26):
		d[s[i]] = i
	for v in string:
		x = d[v]
		fre[x] += 1
	if max(fre) > 1:
		return 'NO'
	for i in range(26):
		if fre[i] != 0:
			start = i
			break
	for i in range(start, 26):
		if fre[i] == 0 and l != 0:
			return 'No'
		l -= 1
		if l == 0:
			return 'YES'
t = int(input())
while t > 0:
	string = input()
	print(fun(string))
	t -= 1


n = int(input())
arr = []
for i in range(n):
	arr.append(input())
alphabet = 'abcdefghijklmnopqrstuvwxyz'
res = []
for i in arr:
	setted_i = ''.join(sorted(set(i)))
	sorted_i = ''.join(sorted(i))
	if sorted_i == setted_i:
		if sorted_i in alphabet:
			res.append('Yes')
		else:
			res.append('No')
	else:
		res.append('No')
for i in res:
	print(i)


n = int(input())
for _ in range(n):
	s = input()
	flag = [False] * 26
	t = True
	for c in s:
		index = ord(c) - ord('a')
		if flag[index]:
			print('No')
			t = False
			break
		flag[index] = True
	if t:
		i = 0
		while not flag[i]:
			i += 1
		j = 25
		while not flag[j]:
			j -= 1
		t = True
		for k in range(i, j):
			if not flag[k]:
				print('No')
				t = False
				break
		if t:
			print('Yes')


for _ in range(int(input())):
	l = list(input())
	s = set(l)
	str = 'abcdefghijklmnopqrstuvwxyz'
	flag = True
	if len(l) == len(s):
		s = sorted(s)
		s = ''.join(s)
		j = str.find(s)
		for i in s:
			if i == str[j]:
				j += 1
			else:
				flag = False
	else:
		flag = False
	if flag:
		print('YES')
	else:
		print('NO')


m = int(input())
for i in range(m):
	s = input()
	a = []
	c = 0
	i = 0
	while i < len(s):
		a.append(ord(s[i]))
		i += 1
	a.sort()
	i = 0
	while i < len(a) - 1:
		if a[i + 1] - a[i] != 1:
			print('no')
			c = 1
			break
		i += 1
	if c == 0:
		print('yes')


n = int(input())
s = []
for num in range(n):
	t = [i for i in input()]
	s.append(t)

def criti(x):
	y = [ord(i) for i in x]
	y.sort()
	from collections import Counter
	if len(x) - 1 == sum([a - b for (a, b) in zip(y[1:], y[:-1])]):
		k = Counter(y)
		if len([i for i in k.values() if i > 1]) == 0:
			return 'Yes'
		else:
			return 'No'
	else:
		return 'No'
for i in range(n):
	if len(s[i]) == 1:
		print('Yes')
	else:
		print(criti(s[i]))


n = int(input())
for _ in range(n):
	s = sorted(input())
	test = len(s) == len(set(s)) == 1 + ord(s[-1]) - ord(s[0])
	print('yes' if test else 'no')


for i in range(int(input())):
	(s, ar, ascii) = (input(), [], [])
	for i in s:
		if i not in ar:
			ar.append(i)
			ascii.append(ord(i))
	if max(ascii) - min(ascii) + 1 == len(ar) and len(s) == len(ar):
		print('YES')
	else:
		print('NO')


indexes = {}
alpha = 'abcdefghijklmnopqrstuvwxyz'
for i in alpha:
	indexes[i] = alpha.index(i)
n = int(input())
for i in range(n):
	raw = input()
	inOrder = sorted(raw)
	let = indexes[inOrder[0]] - 1
	flag = True
	for letter in inOrder:
		if indexes[letter] != let + 1 or indexes[letter] == let:
			flag = False
			break
		let = indexes[letter]
	if flag:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	n = input()
	sn = sorted(list(set(n)))
	ln = sorted(list(n))
	if len(n) == 1:
		print('Yes')
		continue
	ct = 0
	if sn == ln:
		for i in range(len(ln) - 1):
			if ord(ln[i]) + 1 != ord(ln[i + 1]):
				print('No')
				ct += 1
				break
		if ct == 0:
			print('Yes')
	else:
		print('No')


from sys import exit
for _ in range(int(input())):
	s = [i for i in input()]
	if len(set(s)) != len(s):
		print('No')
	else:
		sor = sorted(s)
		check = True
		for i in range(1, len(sor)):
			if ord(sor[i]) - ord(sor[i - 1]) != 1:
				check = False
		print('Yes' if check else 'No')


t = int(input())
while t:
	t -= 1
	s = input()
	n = len(s)
	a = []
	ans = 1
	for i in range(26):
		a.append(0)
	cnt = 0
	for i in range(n):
		x = ord(s[i]) - 97
		a[x] += 1
		cnt += 1
		if a[x] > 1:
			ans = 0
			break
	if ans == 0:
		print('NO')
	else:
		i = 0
		c = 0
		while i < 26 and a[i] == 0:
			i += 1
			c += 1
		while i < 26 and a[i] == 1:
			i += 1
		if i - c != cnt:
			print('NO')
		else:
			print('YES')


n = int(input())
for i in range(n):
	s = list(input())
	if len(s) > 26:
		print('No')
	elif len(s) == 1:
		print('Yes')
	else:
		s = sorted(s)
		for j in range(len(s) - 1):
			if ord(s[j + 1]) - ord(s[j]) != 1:
				print('No')
				break
			if j == len(s) - 2:
				print('Yes')


def main():
	jumlah_string = int(input())
	list_string = []
	for i in range(jumlah_string):
		string_append = input()
		list_string.append(string_append)
	diverse_strings(list_string)

def diverse_strings(list_string):
	char_validator = []
	for i in list_string:
		if len(char_validator) > 0:
			for j in range(26):
				char_validator[j] = False
		else:
			for j in range(26):
				char_validator.append(False)
		flag_double = False
		for j in i:
			index_char = ord(j) - ord('a')
			if char_validator[index_char] == True:
				print('No')
				flag_double = True
				break
			else:
				char_validator[index_char] = True
		if not flag_double:
			flag_bolong1 = False
			flag_bolong2 = False
			flag_bolong = False
			for j in char_validator:
				if j == True:
					if flag_bolong2:
						flag_bolong = True
						print('No')
						break
					else:
						flag_bolong1 = True
				elif flag_bolong1:
					flag_bolong2 = True
			if not flag_bolong:
				print('Yes')
main()


n = int(input())
for i in range(n):
	cadena = sorted(input())
	if len(cadena) == len(set(cadena)) and ord(cadena[0]) + len(cadena) - 1 == ord(cadena[-1]):
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = list(input())
	s.sort()
	if len(s) > 1:
		for j in range(len(s) - 1):
			if len(s) != len(set(s)):
				print('NO')
				break
			elif ord(s[j]) + 1 != ord(s[j + 1]):
				print('NO')
				break
			elif j == len(s) - 2:
				print('YES')
				break
	else:
		print('YES')


t = int(input())
kol = [0 for i in range(27)]
k = 0
f = 0
for i in range(t):
	s = input()
	s.lower()
	for j in range(len(s)):
		kol[ord(s[j]) - ord('a')] = 1
		k += 1
	for j in range(len(kol)):
		if kol[j] == 1 and f == 0:
			f = 1
		if f == 1:
			k -= 1
			if kol[j] == 0:
				print('No')
				break
		if k == 0:
			print('Yes')
			break
	kol = [0 for j in range(27)]
	k = 0
	f = 0


for _ in [0] * int(input()):
	a = sorted(map(ord, input()))
	print('YNeos'[a != [*range(a[0], a[-1] + 1)]::2])


for _ in range(int(input())):
	s = list(map(ord, list(input())))
	s.sort()
	for i in range(len(s)):
		if i == len(s) - 1:
			break
		if s[i] == s[i + 1]:
			print('NO')
			break
		if s[i + 1] > s[i] + 1:
			print('NO')
			break
	if i == len(s) - 1:
		print('YES')


from sys import setcheckinterval, stdin
setcheckinterval(1000)
iin = lambda : int(stdin.readline())
lin = lambda : list(map(int, stdin.readline().split()))
for _ in range(iin()):
	a = list(input())
	sa = set(a)
	if len(sa) != len(a):
		print('No')
		continue
	a.sort()
	ch = ord(a[0])
	l = len(a)
	for i in range(1, l):
		if ord(a[i]) != ord(a[i - 1]) + 1:
			print('No')
			break
	else:
		print('Yes')


n = int(input())
for x in range(n):
	x = input()
	word = list(x)
	count = [0] * 27
	multiples = False
	word.sort()
	diverse = True
	for i in range(len(word) - 1):
		if ord(word[i + 1]) - ord(word[i]) > 1 or ord(word[i + 1]) - ord(word[i]) == 0:
			diverse = False
			print('No')
			break
	if diverse == True:
		print('Yes')


t = int(input())
for j in range(t):
	list1 = []
	list1 = sorted(list(map(str, input())))
	l = len(list1)
	ct = 0
	if l == 1:
		print('Yes')
	else:
		for i in range(0, l - 1):
			if list1[i] in list1[i + 1:] or chr(ord(list1[i + 1]) - 1) != list1[i]:
				ct += 1
				print('No')
				break
		if ct == 0:
			print('Yes')


n = int(input())
for _ in range(n):
	s = input()
	lens = len(s)
	mat = set(map(ord, (i for i in s)))
	if len(mat) == lens and max(mat) - min(mat) == lens - 1:
		print('Yes')
	else:
		print('No')


import string
n = int(input())
arr = []
for i in range(n):
	arr.append(input())
string = 'abcdefghijklmnopqrstuvwxyz'
for s in arr:
	if len(set(s)) == len(s):
		ss = list(s)
		ss.sort()
		ss = ''.join(ss)
		if ss in string:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	li1 = sorted(s)
	li2 = set(li1)
	ss = ''.join(li1)
	sp = 'abcdefghijklmnopqrstuvwxyz'
	if ss in sp and len(li1) == len(li2):
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	l = []
	for i in s:
		l.append(ord(i))
	l.sort()
	flag = 0
	for i in range(len(l) - 1):
		if l[i] + 1 == l[i + 1]:
			continue
		else:
			flag = 1
			print('NO')
			break
	if flag == 0:
		print('YES')


n = int(input())
import string
alphabet = string.ascii_lowercase
for i in range(n):
	s = input()
	x = list(s)
	x.sort()
	new = ''
	for i in x:
		new += i
	if new in alphabet:
		print('Yes')
	else:
		print('No')


import sys
from collections import defaultdict as dd
from itertools import permutations as pp
from itertools import combinations as cc
from collections import Counter as ccd
from random import randint as rd
from bisect import bisect_left as bl
import heapq
mod = 10 ** 9 + 7

def ri(flag=0):
	if flag == 0:
		return [int(i) for i in sys.stdin.readline().split()]
	else:
		return int(sys.stdin.readline())

def ff(a):
	return ord(a) - ord('a')
for _ in range(ri(1)):
	a = list(input())
	a.sort()
	f = 1
	b = list(set(a))
	b.sort()
	if len(a) != len(b):
		f = 0
	for i in range(1, len(b)):
		if ff(b[i]) - ff(b[i - 1]) != 1:
			f = 0
	if f:
		print('Yes')
	else:
		print('No')


t = int(input())
while t:
	st = input()
	f = 0
	st = list(st)
	st.sort()
	p = ''
	for i in range(len(st)):
		p += st[i]
	for i in range(len(p) - 1):
		a = ord(p[i])
		b = ord(p[i + 1])
		if b == a + 1:
			f = 0
		else:
			f = 1
			break
	if f == 0:
		print('Yes')
	else:
		print('No')
	t -= 1


n = int(input())
list1 = []
for i in range(n):
	list1.append(input())
for string in list1:
	temp = list(map(ord, list(string)))
	count = len(temp)
	if count == 1:
		print('YES')
		continue
	temp.sort()
	b = True
	for i in range(count - 1):
		if temp[i] != temp[i + 1] - 1:
			b = False
	if b:
		print('YES')
	else:
		print('NO')


n = input()
x = []
for i in range(int(n)):
	tmp = input()
	x.append(tmp)
for i in x:
	trigger = 0
	b = sorted(i)
	for i in range(len(b) - 1):
		if ord(b[i]) == ord(b[i + 1]):
			trigger = 1
		if abs(ord(b[i]) - ord(b[i + 1])) > 1:
			trigger = 1
	if trigger == 1:
		print('No')
	else:
		print('Yes')


def check(s):
	if len(s) == 1:
		return 'Yes'
	for i in range(1, len(s)):
		if len(s) == 1:
			return s
		if ord(s[i]) - ord(s[i - 1]) == 1:
			result = 'Yes'
		elif s.count(s[i]) > 1 or s.count(s[i - 1]) > 1:
			result = 'No'
			break
		else:
			result = 'No'
			break
	return result
n = int(input())
lines = []
for i in range(n):
	lines.append(input())
for i in range(0, len(lines)):
	print(check(sorted(lines[i])))


import sys
read = sys.stdin.read
readlines = sys.stdin.readlines

def main():
	n = int(input())
	for _ in range(n):
		s = list(input())
		s.sort()
		for i1 in range(len(s) - 1):
			if 1 != ord(s[i1 + 1]) - ord(s[i1]):
				print('no')
				break
		else:
			print('Yes')
main()


j = int(input())
for a in range(j):
	string = input()
	arr = []
	count = 0
	for i in range(len(string)):
		n = ord(string[i])
		arr.append(n)
	arr = sorted(arr)
	for i in range(1, len(string)):
		if arr[i] - arr[i - 1] == 1:
			count = count + 1
	if count + 1 == len(string):
		print('YES')
	else:
		print('NO')


n = int(input())
for x in range(n):
	s = sorted(input())
	is_varied = True
	for y in range(len(s)):
		if s[y] != chr(ord(s[0]) + y):
			is_varied = False
			break
	print('Yes' if is_varied else 'No')


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
import sys
input = sys.stdin.readline
scan_int = lambda : int(input())
scan_string = lambda : input().rstrip()
read_list = lambda : list(read())
read = lambda : map(int, input().split())
read_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def is_integer(n):
	return math.ceil(n) == math.floor(n)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(beauty, s, n, count):
	pass
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
import bisect as bis
import random
import sys
import collections as collect

def solve():
	s = scan_string()
	s = list(sorted(s))
	for i in range(1, len(s)):
		if s[i] != chr(ord(s[i - 1]) + 1):
			print('NO')
			return
	print('YES')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for i in range(scan_int()):
	solve()


n = int(input())
ot = []
for i in range(n):
	x = []
	x.extend(input())
	x.sort()
	ans = 'Yes'
	if len(x) > len(set(x)):
		ans = 'No'
	for j in range(1, len(x)):
		if ord(x[j - 1]) + 1 != ord(x[j]):
			ans = 'No'
			break
	ot.append(ans)
print('\n'.join(ot))


for i in range(int(input())):
	a = input()
	cnt = 1
	if len(a) == 1:
		print('YES')
	elif len(set(a)) != len(a):
		print('NO')
	else:
		a = list(a)
		a.sort()
		for j in range(len(a) - 1):
			if ord(a[j]) - ord(a[j + 1]) != -1:
				cnt = 0
		print('YES' if cnt == 1 else 'NO')


def main():
	n = int(input())
	for _ in range(n):
		s = list(input())
		s.sort()
		res = 'yes'
		for i in range(len(s) - 1):
			if ord(s[i + 1]) - ord(s[i]) != 1:
				res = 'no'
				break
		print(res)
main()


n = int(input())
lines = list()
for i in range(n):
	lines.append(input())
for line in lines:
	if len(line) > 27:
		print('no')
		continue
	d_line = list()
	for c in line:
		d_line.append(ord(c))
	d_line.sort()
	flag = False
	for j in range(len(d_line) - 1):
		if d_line[j] + 1 != d_line[j + 1]:
			print('no')
			flag = True
			break
	if not flag:
		print('yes')


n = int(input())
for i in range(0, n):
	flag = 0
	s = input()
	s1 = list(s)
	s1 = set(s1)
	if len(s1) != len(s):
		print('No')
	else:
		s2 = list(s)
		s2.sort()
		for i in range(0, len(s2)):
			if i != len(s) - 1:
				if ord(s2[i]) + 1 == ord(s2[i + 1]):
					continue
				else:
					print('No')
					flag = 1
					break
		if flag == 0:
			print('Yes')


x = int(input())
for i in range(x):
	p = input()
	if len(p) == 1:
		print('Yes')
	else:
		q = ''
		t = sorted(p)
		q = q.join(t)
		l = 'abcdefghijklmnopqrstuvwxyz'
		if q in l:
			print('Yes')
		else:
			print('No')


n = int(input())
for x in range(n):
	s = input()
	if len(s) > 26:
		print('No')
		continue
	l = [ord(i) for i in s]
	l.sort()
	for i in range(len(l) - 1):
		if l[i + 1] != l[i] + 1:
			print('No')
			break
	else:
		print('Yes')


n = int(input())
for i in range(n):
	s = input()
	v = []
	flag = 1
	for i in range(len(s)):
		if len(s) != len(set(s)):
			print('NO')
			flag = 9
			break
		elif len(s) == 1:
			print('YES')
			flag = 2
			break
		else:
			v.append(ord(s[i]))
	v.sort()
	for i in range(len(v) - 1):
		if v[i] + 1 == v[i + 1]:
			continue
		else:
			print('NO')
			flag = 0
			break
	if flag == 1:
		print('YES')


t = int(input())
for _ in range(t):
	s = input()
	flag = 0
	s1 = ''.join(sorted(''.join(set(s))))
	if len(s1) != len(s):
		print('No')
	else:
		k = ord(s1[0])
		for i in range(1, len(s)):
			if ord(s1[i]) - i == k:
				flag = 1
			else:
				flag = 0
				break
		if flag or len(s) == 1:
			print('Yes')
		else:
			print('No')


t = int(input())
while t > 0:
	s = input()
	s = list(s)
	s.sort()
	flag = 1
	for i in range(len(s) - 1):
		if ord(s[i + 1]) == ord(s[i]) + 1:
			pass
		else:
			flag = 0
			continue
	if flag == 1:
		print('Yes')
	else:
		print('No')
	t -= 1


import atexit
import io
import sys
_I_B = sys.stdin.read().splitlines()
input = iter(_I_B).__next__
_O_B = io.StringIO()
sys.stdout = _O_B

@atexit.register
def write():
	sys.__stdout__.write(_O_B.getvalue())
az = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(int(input())):
	s = list(input())
	ts = set(s)
	if len(s) == len(ts):
		s.sort()
		s = ''.join(s)
		if s in az:
			print('YES')
		else:
			print('NO')
	else:
		print('No')


n = int(input())
for _ in range(n):
	string = sorted(input().strip())
	last = ord(string[0])
	for c in string[1:]:
		if last + 1 != ord(c):
			print('No')
			break
		last = ord(c)
	else:
		print('Yes')


t = int(input(''))
fin = []

def chk(a):
	for i in range(len(a) - 1):
		if a[i + 1] - a[i] != 1:
			return False
	return True
for i in range(t):
	s = input('')
	a = []
	for j in range(len(s)):
		a.append(ord(s[j]))
	a.sort()
	if chk(a):
		fin.append('Yes')
	else:
		fin.append('No')
for it in fin:
	print(it)


n = int(input())
s = []
for i in range(n):
	s.append(input())

def areConsecutive(arr, n):
	if n < 1:
		return False
	Min = min(arr)
	Max = max(arr)
	if Max - Min + 1 == n:
		visited = [False for i in range(n)]
		for i in range(n):
			if visited[arr[i] - Min] != False:
				return False
			visited[arr[i] - Min] = True
		return True
	return False
for x in range(n):
	st = s[x]
	z = 0
	a = []
	y = 0
	for z in range(len(st)):
		y = ord(st[z])
		a.append(y)
	c = len(a)
	j = areConsecutive(a, c)
	if j == 1:
		print('Yes')
	if j == 0:
		print('No')


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	s = list(input())
	n = len(s)
	s.sort()
	f = 1
	for i in range(n - 1):
		if ord(s[i]) + 1 != ord(s[i + 1]):
			f = 0
			break
	print('YES' if f else 'NO')


t = int(input())
for i in range(t):
	b = input()
	c = []
	for j in b:
		c.append(j)
	if len(c) == len(set(c)):
		c.sort()
		k = ord(c[-1]) - ord(c[0])
		if k == len(c) - 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


def process(A):
	B = []
	for i in A:
		B.append(ord(i))
	C = sorted(B)
	flag = True
	for i in range(len(C)):
		if C[i] != C[0] + i:
			flag = False
			break
	if flag:
		print('Yes')
	else:
		print('NO')
n = int(input())
for i in range(n):
	A = input()
	process(A)


for q in range(int(input())):
	str = input()
	list = sorted(str)
	(flag, i) = (0, 0)
	while i < len(str) - 1 and len(str) > 1:
		if ord(list[i + 1]) == ord(list[i]) + 1:
			flag = 1
		else:
			flag = 0
			break
		i = i + 1
	if len(str) == 1:
		flag = 1
	print('Yes' if flag else 'No')


n = int(input())
b = [input() for i in range(n)]
for i in b:
	y = [0] * 255
	m = 0
	v = 1000
	F = 1
	for j in i:
		y[ord(j)] += 1
		if ord(j) > m:
			m = ord(j)
		if ord(j) < v:
			v = ord(j)
	for j in range(v, m + 1):
		if 'z' in i and 'a' in i and (len(i) < 26):
			F = 0
			break
		elif y[j] == 0 or y[j] > 1:
			F = 0
			break
	if F:
		print('Yes')
	else:
		print('No')


import sys
t = int(sys.stdin.readline())
for i in range(t):
	s = input()
	l = list(s)
	l.sort()
	l1 = []
	for i in l:
		l1.append(ord(i))
	s1 = set(l1)
	flag = 0
	if len(l1) == len(s1):
		count = l1[0]
		for i in l1:
			if count == i:
				count += 1
			else:
				flag = 1
		if flag == 1:
			sys.stdout.write('No\n')
		else:
			sys.stdout.write('Yes\n')
	else:
		sys.stdout.write('No\n')


for _ in range(int(input())):
	s = input()
	a = [i for i in s]
	a.sort()
	key = 'abcdefghijklmnopqrstuvwxyz'
	if ''.join(a) in key:
		print('YES')
	else:
		print('NO')


import string
abc = string.ascii_lowercase
n = int(input())
strings = []
for i in range(n):
	strings.append(''.join(sorted(input())))
for s in strings:
	if s in abc:
		print('Yes')
	else:
		print('No')


from collections import Counter, defaultdict, deque
import itertools
import string

def check(s, idx):
	c = set(s)
	if len(s) == 1:
		return True
	if len(c) != len(s):
		return False
	s = sorted(s)
	for i in range(len(s) - 1):
		if abs(idx[s[i]] - idx[s[i + 1]]) != 1:
			return False
	return True
idx = dict(((y, x) for (x, y) in enumerate(string.ascii_letters)))
n = int(input())
for _ in range(n):
	s = input()
	print('Yes' if check(s, idx) else 'No')


n = int(input())
alph = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	s = sorted(input())
	for j in range(len(s) - 1):
		if alph.index(s[j + 1]) - alph.index(s[j]) != 1:
			print('No')
			break
	else:
		print('Yes')


t = int(input())
for z in range(t):
	s = input()
	a = []
	for i in s:
		a.append(i)
	a.sort()
	flag = 0
	for i in a:
		if a.count(i) != 1:
			flag = 1
	for i in range(len(a) - 1):
		if ord(a[i]) + 1 != ord(a[i + 1]):
			flag = 1
	if flag == 0:
		print('yes')
	else:
		print('no')


for _ in range(int(input())):
	s = input()
	l = []
	for i in s:
		l.append(i)
	l.sort()
	ans = True
	for i in range(1, len(l)):
		if ord(l[i - 1]) + 1 != ord(l[i]):
			print('NO')
			ans = False
			break
	if ans:
		print('YES')


n = int(input())

def checkDiverse(s):
	l = sorted(s)
	for i in range(len(l) - 1):
		if ord(l[i]) - ord(l[i + 1]) != -1:
			print('no')
			return
	print('yes')
[checkDiverse(input()) for i in range(n)]


def main():
	string = list(str(input()))
	string.sort()
	for i in range(len(string) - 1):
		if abs(ord(string[i]) - ord(string[i + 1])) != 1:
			print('No')
			return
	if len(string) == len(set(string)):
		print('Yes')
	else:
		print('No')
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
test()


n = int(input())
al = [chr(i) for i in range(ord('a'), ord('z') + 1)]
for i in range(n):
	line = input()
	S = set(line)
	min_idx = ord(min(line)) - 97
	max_idx = ord(max(line)) - 97
	if S == set(al[min_idx:max_idx + 1]) and len(S) == len(line):
		print('Yes')
	else:
		print('No')


n = int(input())

def valid(s):
	c = s[0]
	for d in s[1:]:
		if ord(d) - ord(c) != 1:
			print('NO')
			return
		c = d
	print('YES')
for _ in range(n):
	s = input()
	s = sorted(s)
	valid(s)


def hello(x):
	for i in x:
		if i in y:
			print('NO')
			return -1
		else:
			y[i] = ord(i) - ord('a')
	array = list(y.values())
	array.sort()
	if sorted(array) == list(range(min(array), max(array) + 1)):
		print('YES')
	else:
		print('NO')
for _ in range(int(input())):
	y = {}
	x = list(input().lower())
	hello(x)


n = int(input())
alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for i in range(n):
	string = input()
	A = []
	c = 0
	for i in range(len(string)):
		if string.count(string[i]) > 1:
			c = c + 1
	if c > 0:
		print('NO')
	else:
		for i in range(len(string)):
			for j in range(26):
				if string[i] == alpha[j]:
					A.append(j + 1)
		A.sort()
		for j in range(1, len(string)):
			if abs(A[j - 1] - A[j]) != 1:
				c = c + 1
		if c > 0:
			print('NO')
		else:
			print('YES')


n = eval(input())
while n > 0:
	word = input()
	letters = list(word)
	letters.sort()
	correct = True
	pointer = len(letters) - 1
	i = 0
	while i < pointer:
		a = ord(letters[i]) + 1
		b = ord(letters[i + 1])
		if a != b:
			correct = False
			break
		i += 1
	if correct:
		print('Yes')
	else:
		print('No')
	n -= 1


T = int(input())
ans = ['Yes'] * T
for t in range(T):
	S = input()
	lis = [0] * 26
	min_s = 26
	max_s = -1
	for s in S:
		p = ord(s) - ord('a')
		lis[p] += 1
		min_s = min(min_s, p)
		max_s = max(max_s, p)
	for l in range(min_s, max_s + 1):
		if lis[l] != 1:
			ans[t] = 'No'
print(*ans, sep='\n')


import string
alphabet = string.ascii_lowercase
n = int(input())
for i in range(n):
	s = list(input())
	if len(s) > 26 or len(s) > len(set(s)):
		print('No')
	else:
		s.sort()
		ind = alphabet.index(s[0])
		if alphabet[ind + len(s) - 1] == s[-1]:
			print('Yes')
		else:
			print('No')


inp = input()
n = int(inp)
for i in range(n):
	s = input()
	st = ''.join(sorted(s))
	a = ord(st[0]) - 96
	b = ord(st[len(st) - 1]) - 96
	if b == a + len(st) - 1 and len(set(st)) == len(st):
		print('YES\n')
	else:
		print('NO\n')


for _ in range(int(input())):
	alpha = [0] * 27
	s = input()
	smin = s[0]
	l = 0
	for i in s:
		alpha[ord(i) - 96] += 1
		l += 1
		if i < smin:
			smin = i
	flag = 1
	for i in range(ord(smin) - 96, ord(smin) - 96 + l):
		if alpha[i] > 1 or alpha[i] == 0:
			flag = 0
			break
	print('YES' if flag else 'NO')


def main():
	for _ in range(int(input())):
		x = [i for i in input()]
		x.sort()
		i = x[0]
		ans = 'YES'
		counter = 0
		while counter < len(x):
			if i not in x:
				ans = 'NO'
				break
			i = chr(ord(i) + 1)
			counter += 1
		print(ans)
main()


n = int(input())
while n:
	n -= 1
	s = input()
	s = list(s)
	s.sort()
	bol = 1
	for i in range(1, len(s)):
		if s[i] == s[i - 1]:
			bol = 0
	x = ord(s[0])
	y = ord(s[-1])
	if x + len(s) - 1 != y:
		bol = 0
	if bol:
		print('yes')
	else:
		print('no')


import sys
input = sys.stdin.readline
n = int(input())
for i in range(n):
	s = list(input().strip())
	s.sort()
	valid = True
	for j in range(1, len(s)):
		if ord(s[j]) - ord(s[j - 1]) != 1:
			valid = False
			break
	print('YES' if valid else 'NO')


t = int(input())
while t:
	a = list(input())
	a.sort()
	flag = True
	for i in range(len(a)):
		a[i] = ord(a[i])
	for i in range(len(a) - 1):
		if a[i] + 1 != a[i + 1]:
			print('No')
			flag = False
			break
	if flag:
		print('Yes')
	t -= 1


for _ in range(int(input())):
	s = input()
	lens = len(s)
	s = ''.join(sorted(set(s)))
	print(('No', 'Yes')[len(s) == lens and ord(s[-1]) - ord(s[0]) == len(s) - 1])


n = int(input())
strings = [sorted(input()) for i in range(n)]
for string in strings:
	if len(string) != len(set(string)):
		print('No')
	else:
		prev = ord(string[0])
		for ch in string[1:]:
			new_ = ord(ch)
			if prev + 1 != new_:
				print('No')
				break
			else:
				prev = new_
		else:
			print('Yes')


n = int(input())
for j in range(n):
	li = input()
	k = []
	for h in li:
		k.append(h)
	k = sorted(k)
	f = 0
	t = 0
	for i in range(1, len(k)):
		s = ord(k[t]) + 1
		if s != ord(k[i]):
			f = 1
			break
		else:
			t += 1
	if f == 1:
		print('NO')
	else:
		print('YES')


def isdouble(string):
	for i in range(len(string) - 1):
		for j in range(i + 1, len(string)):
			if string[i] == string[j]:
				return False
	return True

def isNear(string):
	lst = []
	for i in range(len(string)):
		lst.append(ord(string[i]))
	lst.sort()
	for i in range(len(lst) - 1):
		if lst[i + 1] - lst[i] > 1:
			return False
	return True
n = int(input())
lst = []
for i in range(n):
	lst.append(input())
for i in range(n):
	if isdouble(lst[i]) == True & isNear(lst[i]) == True:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	a = list((0 for x in range(26)))
	first = -1
	last = -1
	f = 0
	d = 0
	for j in input():
		a[ord(j) - 97] += 1
		if a[ord(j) - 97] > 1:
			print('NO')
			d = 1
			f = 1
			break
	if f == 0:
		for j in range(26):
			if a[j] > 0:
				last = j
			if a[j] == 0 and last > -1:
				break
		for j in range(last + 1, 26):
			if a[j] > 0:
				print('NO')
				d = 1
				break
	if d == 0:
		print('YES')


n = int(input())
for i in range(n):
	s = sorted(list(input()))
	isDiverse = True
	for j in range(len(s) - 1):
		if ord(s[j]) + 1 != ord(s[j + 1]):
			isDiverse = False
			break
	if s != 'a' and s != 'z' and isDiverse:
		print('Yes')
	else:
		print('No')


def sol():
	a = int(input())
	for i in range(a):
		x = input()
		xx = sorted(x)
		f = 1
		for i in range(len(xx) - 1):
			if ord(xx[i + 1]) - ord(xx[i]) != 1:
				print('No')
				f = 0
				break
		if f:
			print('Yes')
sol()


n = int(input())
q = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	s = input()
	z = True
	s1 = sorted(s)
	a = s1[0]
	for j in range(1, len(s1)):
		if s1[j] == a or abs(q.index(s1[j]) - q.index(a)) != 1:
			z = False
			break
		a = s1[j]
	if z:
		print('Yes')
	else:
		print('No')


def p_a():
	line = input()
	(hour, min_) = list(map(int, line.split(' ')))
	delta_min = 60 * hour + min_
	delta_min -= 45
	delta_min %= 24 * 60
	print(delta_min // 60, delta_min % 60)

def p_b():
	line = input()
	(lhs, rhs) = list(map(int, line[::-1].split(' ')))
	print(lhs if lhs > rhs else rhs)

def ascii_deltas(data):
	return [data[i] - data[i - 1] for i in range(1, len(data))]

def p_c():
	num_lines = int(input())
	for i in range(num_lines):
		str_ = ''.join(sorted(input()))
		deltas = ascii_deltas(list(map(ord, str_)))
		if not len(deltas):
			print('yes')
		elif any(map(lambda x: not x, deltas)):
			print('no')
		elif all(map(lambda x: x == 1, deltas)):
			print('yes')
		else:
			print('no')

def main():
	p_c()
main()


def checkContinuity(n, word):
	for i in range(n - 1):
		if ord(word[i + 1]) - ord(word[i]) != 1:
			return 'No'
	return 'Yes'
tc = int(input())
for i in range(tc):
	word = input()
	word = ''.join(sorted(word))
	n = len(word)
	print(checkContinuity(n, word))


n = int(input())
for i in range(n):
	s = input()
	if len(s) > 26 or len(s) != len(set(s)):
		print('No')
	else:
		a = max(s)
		b = min(s)
		if ord(a) - ord(b) + 1 != len(set(s)):
			print('No')
		else:
			print('Yes')


import sys
N = int(sys.stdin.readline().strip())

def isdiv(s):
	s = list(s)
	d = {}
	if len(s) == 1:
		return 'Yes'
	for l in s:
		if l in d.keys():
			return 'No'
		else:
			d[l] = True
	x = []
	for i in range(len(s)):
		x.append(ord(s[i]))
	x.sort()
	if x == list(range(x[0], x[-1] + 1)):
		return 'Yes'
	return 'No'
strings = []
for _ in range(N):
	strings.append(sys.stdin.readline().strip())
res = []
for s in strings:
	res.append(isdiv(s))
sys.stdout.write('\n'.join(res) + '\n')


n = int(input())
for i in range(n):
	ans = 'No'
	s = input()
	if len(set(s)) == len(s):
		s1 = sorted(s)
		mx = 0
		for i in range(len(s1) - 1):
			mx = max(mx, ord(s1[i + 1]) - ord(s1[i]))
		if mx <= 1:
			ans = 'Yes'
	print(ans)


def is_diverse(s):
	start = s[0]
	letters = {start}
	for c in s[1:]:
		if c in letters:
			return False
		else:
			if c < start:
				start = c
			letters.add(c)
	cur = ord(start) + 1
	for i in range(len(s) - 1):
		if chr(cur) not in letters:
			return False
		cur += 1
	return True
n = int(input())
for i in range(n):
	if is_diverse(input()):
		print('Yes')
	else:
		print('No')


n = int(input())
for _ in range(n):
	k = [ord(_) for _ in input()]
	if len(k) == len(set(k)):
		k.sort()
		if k[len(k) - 1] - k[0] == len(k) - 1:
			print('Yes')
			continue
	print('No')


n = int(input())
for _ in range(n):
	s = input()
	d = [0] * 28
	for i in s:
		d[ord(i) - ord('a')] += 1
	t = 1
	i = 0
	while d[i] == 0:
		i += 1
	while d[i] == 1:
		i += 1
	while i < 28:
		if d[i] > 0:
			t = 0
			break
		i += 1
	if t == 1:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	a = list(input())
	b = list(set(a))
	a.sort()
	if len(a) == len(b) and a[0] == chr(ord(a[-1]) - len(a) + 1):
		print('YES')
	else:
		print('NO')


for _ in range(int(input())):
	r = input()
	if len(r) == 1:
		print('Yes')
	else:
		s = ''.join(sorted(r))
		flag = 0
		for i in range(1, len(s)):
			if ord(s[i]) == ord(s[i - 1]) + 1:
				flag = 0
			else:
				flag = 1
				break
		if flag == 0:
			print('Yes')
		else:
			print('No')


def diverse(s):
	if len(set(s)) != len(s):
		return False
	o = list(map(ord, sorted(s)))
	for i in range(1, len(o)):
		if o[i] - o[i - 1] != 1:
			return False
	return True
n = int(input())
for _ in range(n):
	s = input().strip()
	print('Yes' if diverse(s) else 'No')


n = int(input())

def DiverseStrings(s):
	alphabet = 'abcdefghijklmnopqrstuvwxyz'
	if len(set(s)) != len(s):
		return 'No'
	else:
		a = sorted(list(set(s)))
		a = ''.join((str(el) for el in a))
		if a in alphabet:
			return 'Yes'
		else:
			return 'No'
for i in range(n):
	s = input()
	print(DiverseStrings(s))


def main():
	n = int(input())
	for i in range(n):
		s = input()
		my_set = set(s)
		small = min(s)
		large = max(s)
		pos = ord(large) - ord(small) + 1
		if len(my_set) == len(s) and pos == len(s):
			print('YES')
		else:
			print('NO')
main()


def input_ints():
	return list(map(int, input().split()))

def main():
	n = int(input())
	for _ in range(n):
		s = input()
		st = set((ord(c) for c in s))
		n = len(s)
		print('Yes' if len(st) == n and max(st) - min(st) == n - 1 else 'No')
main()


t = int(input())
for i in range(t):
	s = input()
	s = sorted(s)
	f = 0
	for j in range(1, len(s)):
		if ord(s[j]) - ord(s[j - 1]) != 1:
			f = 1
			print('No')
			break
	if f == 0:
		print('Yes')


from sys import stdin, stdout

def main():
	n = int(stdin.readline())
	for i in range(n):
		out = 0
		a = [ord(c) - 96 for c in stdin.readline().replace('\n', '')]
		if min(a) == max(a) - len(a) + 1:
			for x in a:
				if a.count(x) > 1:
					out = 1
					break
		else:
			out = 1
		if out == 0:
			stdout.write('Yes\n')
		else:
			stdout.write('No\n')
main()


n = int(input())
for _ in range(n):
	s = input()
	s = sorted(s)
	nums = list(map(ord, s))
	past = nums[0]
	for num in nums[1:]:
		if num != past + 1:
			print('No')
			break
		past = num
	else:
		print('Yes')


import string
n = int(input())
for i in range(n):
	s = input()
	s = ''.join(sorted(s))
	if s in string.ascii_lowercase:
		print('YES')
	else:
		print('NO')


import string
a = []
for i in string.ascii_lowercase:
	a.append(i)
n = int(input())
for i in range(n):
	s = str(input())
	b = []
	for j in s:
		b.append(j)
	b.sort()
	test = False
	for j in range(27 - len(s)):
		if a[j:j + len(s)] == b:
			test = True
			break
	if test:
		print('Yes')
	else:
		print('No')


N = int(input())
for i in range(N):
	aux = sorted(input())
	non_decrease = all((ord(x) == ord(y) - 1 for (x, y) in zip(aux, aux[1:])))
	if non_decrease:
		print('Yes')
	else:
		print('No')


n = int(input())
ans = []
for i in range(n):
	l = sorted(list(map(lambda x: ord(x), input())))
	(temp, s) = (1, len(l))
	if s == 1:
		ans.append(1)
	else:
		for y in range(1, s):
			if l[y] - l[y - 1] != 1:
				temp = 0
				break
		ans.append(temp)
for a in ans:
	if a:
		print('Yes')
	else:
		print('No')


from sys import stdin
stdin.readline()
NUM_LETTERS = ord('z') - ord('a') + 1

def get_letter_index(letter):
	return ord(letter) - ord('a')
for line in stdin:
	s = line.rstrip()
	letters = [False] * NUM_LETTERS
	flag = False
	for letter in s:
		if letters[get_letter_index(letter)] == True:
			flag = True
			break
		letters[get_letter_index(letter)] = True
	if flag:
		print('No')
		continue
	enumerated = tuple(enumerate(letters))
	first_true_index = (ind for (ind, value) in enumerated if value).__next__()
	last_true_index = (ind for (ind, value) in enumerated[::-1] if value).__next__()
	if all(letters[first_true_index:last_true_index + 1]):
		print('Yes')
	else:
		print('No')


n = int(input())
con = []
for j in range(n):
	h1 = input()
	h = list(h1)
	m = []
	a = 0
	for i in range(len(h1)):
		m.append(ord(h[i]))
		m.sort()
	for i in range(len(h1) - 1):
		if abs(m[i + 1] - m[i] == 1):
			a = a + 1
		else:
			break
	if a == len(h1) - 1:
		con.append('YES')
	else:
		con.append('NO')
for i in range(len(con)):
	print(con[i])


n = int(input())
for case in range(n):
	t = input()
	l = []
	for i in t:
		l.append(ord(i))
	l.sort()
	ans = 'Yes'
	for i in range(len(l) - 1):
		if l[i + 1] - l[i] != 1:
			ans = 'No'
	print(ans)


n = int(input())
for _ in range(n):
	s = [str(x) for x in input()]
	flag = 0
	s.sort()
	flag = 1
	for i in range(len(s) - 1):
		flag = flag and ord(s[i]) + 1 == ord(s[i + 1])
	print('Yes' if flag else 'No')


def sol(a, n):
	for i in range(1, n):
		if ord(a[i]) - ord(a[i - 1]) != 1:
			return 'NO'
	return 'YES'
for _ in range(int(input())):
	a = sorted(list(input()))
	n = len(a)
	print(sol(a, n))


import string

def isUn(str):
	s = set()
	min = 100
	max = -1
	for char in str:
		s.add(char)
		i = string.ascii_lowercase.index(char)
		if i > max:
			max = i
		if i < min:
			min = i
	if len(s) != len(str):
		return False
	elif max - min + 1 == len(str):
		return True
	else:
		return False
n = int(input())
while n > 0:
	str = input()
	if isUn(str):
		print('YES')
	else:
		print('NO')
	n -= 1


def isDiverse(frequencies):
	index = -1
	state = 'no_letter'
	while index < 26:
		index += 1
		if frequencies[index] > 1:
			return False
		if frequencies[index] == 1:
			if state == 'no_letter':
				state = 'some_letters'
			if state == 'word_finished':
				return False
		if frequencies[index] == 0:
			if state == 'some_letters':
				state = 'word_finished'
	return True
numberTests = int(input())
for i in range(0, numberTests):
	string = input()
	frequencies = []
	for j in range(0, 27):
		frequencies += [0]
	for c in string:
		frequencies[ord(c) - ord('a')] += 1
	if isDiverse(frequencies):
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	stt = input()
	cur_chars = []
	for sm in stt:
		cur_chars.append(ord(sm))
	cur_chars.sort()
	old = cur_chars[0]
	b = 0
	for j in range(1, len(cur_chars)):
		cur = cur_chars[j]
		if abs(cur - old) != 1:
			b = 1
			print('No')
			break
		old = cur
	if not b:
		print('Yes')


n = int(input())
for ti in range(n):
	s = input()
	f = [0] * 26
	for i in s:
		f[ord(i) - ord('a')] += 1
	flag = True
	for i in range(26):
		if f[i] > 1:
			flag = False
			break
	if flag:
		s = sorted(s)
		for i in range(len(s) - 1):
			if ord(s[i + 1]) - ord(s[i]) != 1:
				flag = False
				break
		if not flag:
			print('No')
		else:
			print('Yes')
	else:
		print('No')


n = int(input())
for _ in range(n):
	x = list(input())
	x = sorted(x)
	a = list(set(list(x)))
	if len(a) != len(x):
		print('No')
	else:
		k = 0
		for i in range(len(a) - 1):
			if abs(ord(a[i]) - ord(a[i + 1])) == 1:
				k += 1
		if k == len(a) - 1:
			print('Yes')
		else:
			print('No')


def find_pos(m):
	for (i, l) in enumerate(alphabet):
		if l == m:
			return i

def isdiverse(s):
	s = [l for l in s]
	s = sorted(s)
	seq = alphabet[find_pos(s[0]):find_pos(s[0]) + len(s)]
	if s == seq:
		return 'Yes'
	else:
		return 'No'
alphabet = [l for l in 'abcdefghijklmnopqrstuvwxyz']
n_s = int(input())
s_list = [input() for i in range(n_s)]
for s in s_list:
	print(isdiverse(s.lower()))


for _ in range(int(input())):
	l = sorted(input())
	print(('No', 'Yes')[len(l) == len(set(l)) == ord(l[-1]) - ord(l[0]) + 1])


n = int(input())
for i in range(n):
	l = sorted(input())
	s = set()
	s.update(l)
	print('Yes' if ord(l[-1]) - ord(l[0]) == len(l) - 1 and len(s) == len(l) else 'No')


n = int(input())
feedback = []
for i in range(n):
	string = input()
	string = string.lower()
	b = []
	for s in string:
		b.append(ord(s))
	b.sort()
	for j in range(len(b)):
		flag = 0
		if j == 0:
			num = b[j]
		elif b[j] != num:
			feedback.append('No')
			flag = 1
			break
		num += 1
	if flag == 0:
		feedback.append('Yes')
for i in range(n):
	print(feedback[i])


t = int(input())
while t > 0:
	s = input()
	l = []
	for i in range(len(s)):
		l.append(ord(s[i]))
	l.sort()
	flag = 1
	for i in range(1, len(l)):
		if abs(l[i - 1] - l[i]) != 1:
			flag = 0
			break
	if flag == 0:
		print('No')
	else:
		print('Yes')
	t -= 1


def increment(b):
	a = ''.join(sorted(b))
	for j in range(len(a) - 1):
		if ord(a[j + 1]) - ord(a[j]) != 1:
			return 1

def result(a):
	if increment(a) == 1:
		print('No')
	else:
		print('Yes')
n = int(input())
list = []
for i in range(n):
	list.append(input())
for i in list:
	result(i)


import sys

def check(s):
	a = min(s)
	b = max(s)
	letters = set()
	for c in s:
		letters.add(c)
	for x in range(ord(a), ord(b) + 1):
		c = chr(x)
		if c not in letters:
			return False
	return len(letters) == len(s)
n = int(sys.stdin.readline())
for i in range(n):
	s = sys.stdin.readline().strip()
	if check(s):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	a = sorted(list(input()))
	ans = 'YES'
	n = len(a)
	for i in range(n - 1):
		if ord(a[i + 1]) - ord(a[i]) != 1:
			ans = 'NO'
			break
	print(ans)


a = int(input())
for i in range(0, a):
	flag = 0
	b = input()
	c = []
	for i in range(0, len(b)):
		c.append(ord(b[i]))
	c.sort()
	for i in range(0, len(c) - 1):
		if c[i + 1] - c[i] != 1:
			flag = 1
			break
	if flag == 0:
		print('Yes')
	else:
		print('No')


n = int(input())
while n != 0:
	strs = input()
	if len(set(strs)) == len(strs):
		strs = sorted(list(strs))
		minvalue = strs[0]
		tem = [chr(x) for x in range(ord(minvalue), ord(minvalue) + len(strs))]
		ans = 0
		for x in range(len(strs)):
			if strs[x] in tem:
				ans += 1
		print('YES' if ans == len(strs) else 'NO')
	else:
		print('NO')
	n -= 1


t = int(input())
for w in range(t):
	s = list(input())
	a = []
	for i in range(len(s)):
		a.append(ord(s[i]))
	a.sort()
	f = 1
	for i in range(len(a) - 1):
		if a[i] + 1 != a[i + 1]:
			f = 0
			break
	if f == 1:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	s = input()
	s = s.lower()
	dic = {}
	for i in s:
		try:
			dic[ord(i)] += 1
		except:
			dic[ord(i)] = 1
	flag = True
	for i in dic:
		if dic[i] > 1:
			flag = False
	l = list(dic.keys())
	l.sort()
	flag2 = True
	for i in range(len(l) - 1):
		if l[i + 1] - l[i] != 1:
			flag2 = False
	if flag2 and flag:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	s = input()
	f = 0
	a = ''.join(sorted(s))
	if len(s) == 1:
		print('yes')
	else:
		for i in range(len(s) - 1):
			if abs(ord(a[i]) - ord(a[i + 1])) == 1:
				f = 1
			else:
				f = 0
				break
		if f == 1:
			print('yes')
		else:
			print('no')
	t = t - 1


t = int(input())
for _ in range(0, t):
	n = input()
	n = list(n)
	n.sort()
	if len(n) == 1:
		print('Yes')
	else:
		flag = 0
		for i in range(0, len(n) - 1):
			z = ord(n[i + 1])
			y = ord(n[i])
			if z - y == 1:
				flag = 0
			else:
				flag = 1
				break
		if flag == 0:
			print('Yes')
		else:
			print('No')


otv = []
n = int(input())
abc = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']

def ok_no(st):
	global abc, otv
	sl = []
	for x in range(len(st)):
		sl.append(st[x])
	n_len = len(sl)
	for j in range(0, n_len - 1):
		for i in range(0, n_len - j - 1):
			if sl[i] > sl[i + 1]:
				(sl[i], sl[i + 1]) = (sl[i + 1], sl[i])
	for x in range(len(abc)):
		if sl[0] == abc[x]:
			xx = x
	abc2 = abc[xx:len(sl) + xx]
	if sl == abc2:
		otv.append('YES')
	else:
		otv.append('NO')
for i in range(n):
	stroka = input()
	if len(stroka) < 27:
		if len(stroka) == 1:
			otv.append('YES')
		else:
			ok_no(stroka)
	elif len(stroka) >= 27:
		otv.append('NO')
for i in range(len(otv)):
	print(otv[i])


def sint():
	return int(input())

def sints():
	return map(int, input().split())

def sara():
	return list(map(int, input().split()))

def sstr():
	s = input()
	return list(s[:len(s)])

def main():
	t = sint()
	while t:
		t -= 1
		vis = [0] * 30
		s = input()
		l = len(s)
		for i in range(l):
			vis[ord(s[i]) - 97] += 1
		flg = True
		cnt = 0
		i = 0
		while i < 26 and flg and (cnt == 0):
			while vis[i]:
				if vis[i] > 1:
					flg = False
					break
				else:
					cnt += 1
				i += 1
			i += 1
		if flg and cnt == l:
			print('Yes')
		else:
			print('No')
main()


n = int(input())
for _ in range(n):
	s = [ord(c) for c in input()]
	l = min(s)
	r = max(s)
	for c in range(l, r + 1):
		if s.count(c) != 1:
			print('No')
			break
	else:
		print('Yes')


for t in range(int(input())):
	s = input()
	a = [0] * 200
	mn = 200
	mx = 0
	for x in s:
		a[ord(x)] += 1
		mn = min(mn, ord(x))
		mx = max(mx, ord(x))
	ans = 'YES'
	for x in a[mn:mx + 1]:
		if x != 1:
			ans = 'NO'
	print(ans)


from math import fabs
N = int(input())
for i in range(N):
	a = sorted([ord(k) for k in list(input())])
	for j in range(1, len(a)):
		if a[j] - a[j - 1] != 1:
			print('NO')
			break
	else:
		print('YES')


n = int(input())
output = []
for i in range(n):
	c = 0
	line = input()
	numLine = []
	for j in range(len(line)):
		numLine.append(ord(line[j]))
	numLine = sorted(numLine)
	for j in range(len(line) - 1):
		if numLine[j + 1] - numLine[j] != 1:
			output.append('No')
			c = 1
			break
	if c == 0:
		output.append('Yes')
for i in range(n):
	print(output[i])


test_case = int(input())

def diverse(s):
	num = ord(s[0])
	for i in range(1, len(s)):
		if i >= 26:
			return 'No'
		if num + i != ord(s[i]):
			return 'No'
	return 'Yes'
for i in range(test_case):
	s = input()
	s = ''.join(sorted(s))
	print(diverse(s))


for _ in range(int(input())):
	arr = list(input().strip())
	n = len(arr)
	arr = sorted(list(set(arr)))
	if len(arr) == n:
		if len(arr) == 1:
			print('Yes')
		else:
			flag = 1
			for i in range(n - 1):
				if ord(arr[i + 1]) - ord(arr[i]) != 1:
					flag = 0
					break
			if flag == 1:
				print('Yes')
			else:
				print('No')
	else:
		print('No')


for i in range(int(input())):
	s = list(map(str, input()))
	d = []
	for i in s:
		d.append(ord(i))
	d.sort()
	e = 'YES'
	for i in range(len(d) - 1):
		if d[i + 1] - d[i] != 1:
			e = 'NO'
			break
	print(e)


a = int(input())
for i in range(a):
	z = input()
	x = []
	for i in range(len(z)):
		x.append(int(ord(z[i])))
	x = sorted(x)
	ans = 1
	for i in range(len(x) - 1):
		if x[i + 1] == x[i] + 1:
			continue
		else:
			ans = 0
			break
	if ans == 1:
		print('Yes')
	else:
		print('No')


def answer():
	n = int(input())
	alfie = 'abcdefghijklmnopqrstuvwxyz'
	while n:
		a = list(input())
		if len(set(a)) == len(a) and len(a) <= 26:
			a.sort()
			if a == list(alfie[alfie.index(a[0]):len(a) + alfie.index(a[0])]):
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
		n -= 1
answer()


n = int(input())
for i in range(0, n):
	s = input()
	c = 0
	b = sorted(s)
	for l in range(0, len(b) - 1):
		if ord(b[l + 1]) - ord(b[l]) == 1:
			c += 1
		else:
			break
	if c == len(s) - 1:
		print('yes')
	else:
		print('no')


n = int(input())
result = []
i = 0
while i < n:
	s = input()
	j = ord('a')
	(j_min, j_max) = (-1, -1)
	h = 0
	while j <= ord('z'):
		if s.find(chr(j)) != -1:
			if j_min == -1:
				j_min = j
			h += 1
			j_max = j
		j += 1
	if j_max - j_min + 1 == len(s) and h == len(s):
		result.append('Yes')
	else:
		result.append('No')
	i += 1
for ans in result:
	print(ans)


def solve(s):
	ss = sorted(s)
	n = len(ss)
	res = 'YES'
	for i in range(1, n):
		if ord(ss[i]) - ord(ss[i - 1]) != 1:
			res = 'NO'
			break
	return res
N = int(input())
for i in range(N):
	s = input()
	res = solve(s)
	print(res)


n = int(input())
li = []
for i in range(n):
	li.append(input())
for string in li:
	if len(string) == 1:
		print('Yes')
		continue
	temp = list(map(lambda x: ord(x), string))
	temp.sort()
	dif = []
	for i in range(len(temp) - 1):
		if temp[i + 1] - temp[i] == 1 or temp[i + 1] - temp[i] == -1:
			continue
		else:
			print('No')
			break
	else:
		print('Yes')


n = int(input())
for i in range(n):
	s = input()
	f = 0
	if not s.islower():
		s.lower()
	s = ''.join(sorted(s))
	for j in range(len(s) - 1):
		if ord(s[j + 1]) - ord(s[j]) != 1:
			f = 1
			break
	if f != 1:
		print('YES')
	else:
		print('NO')


def isDiverseString(s):
	alphabet = 'abcdefghijklmnopqrstuvwxyz'
	s = sorted(s)
	if ''.join(s) in alphabet:
		print('Yes')
	else:
		print('No')
n = int(input())
for i in range(n):
	s = input()
	isDiverseString(s)


n = int(input())
an = []
for i in range(n):
	s = input()
	ss = set(s)
	if len(s) != len(ss):
		an.append('No')
		continue
	s = list(ss)
	s.sort()
	b = ord(s[0])
	a = 0
	for j in s:
		if ord(j) - b > 1:
			an.append('No')
			a = 1
			break
		b = ord(j)
	if not a:
		an.append('Yes')
for i in an:
	print(i)


a = int(input())
s = []
for i in range(0, a):
	b = input()
	c = min(b)
	d = 0
	op = 0
	e = len(b)
	while c in b:
		c = chr(ord(c) + 1)
		d = d + 1
		if d == len(b):
			op = 1
			break
	if op == 1:
		s.append(1)
	elif op == 0:
		s.append(0)
for i in s:
	if i == 1:
		print('YES')
	elif i == 0:
		print('No')


n = int(input())

def get_ans():
	st = input()
	ls = [0] * 26
	for i in range(len(st)):
		ls[ord(st[i]) - ord('a')] += 1
	for x in ls:
		if x > 1:
			print('No')
			return
	state = 0
	for x in ls:
		if state == 0 and x == 1:
			state = 1
		if state == 1 and x == 0:
			state = 2
		if state == 2 and x == 1:
			print('No')
			return
	print('Yes')
for _ in range(n):
	get_ans()


for _ in range(int(input())):
	s = list(input())
	a = set(s)
	print(['NO', 'YES'][len(s) == len(a) and ord(max(s)) - ord(min(s)) + 1 == len(s)])


total = input()
for i in range(int(total)):
	order = []
	queue = []
	goal = 0
	sentence = input()
	if len(sentence) == 1:
		print('Yes')
	else:
		for w in sentence:
			order.append(ord(w) % 97)
			if w in queue:
				goal = 1
				break
			else:
				queue.append(w)
		order.sort(reverse=False)
		temp = order[0]
		for j in order[1:]:
			if temp != j - 1:
				goal = 1
				break
			temp = j
		if goal == 1:
			print('No')
		else:
			print('Yes')


n = int(input())

class Enumerable(object):
	pass
for x in range(n):
	s = input()
	l = [ord(i) for i in s]
	l.sort()
	cmp = 0
	f = 0
	f2 = 0
	l1 = [s.count(i) for i in s]
	l2 = []
	for i in s:
		l2.append(1)
	if l1 == l2:
		f2 = 1
	if l[l.__len__() - 1] - l[0] == l.__len__() - 1:
		f = 1
	if f2 == 1 & f == 1:
		print('Yes')
	else:
		print('No')


alph = 'abcdefghijklmnopqrstuvwxyz'
for i in range(int(input())):
	s = input()
	s = ''.join((st for st in sorted(s)))
	newS = ''.join((st for st in sorted(set(s))))
	if len(s) != len(set(s)):
		print('No')
	elif newS not in alph:
		print('No')
	else:
		print('Yes')


n = int(input())
for i in range(n):
	a = input()
	b = set(a)
	c = 0
	if len(a) == 1:
		print('Yes')
	elif len(b) == len(a):
		a = ''.join(sorted(a))
		for j in range(len(a) - 1):
			if ord(a[j]) == ord(a[j + 1]) - 1:
				c = c + 1
		if c == len(a) - 1:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	if len(s) == 1:
		print('Yes')
	elif len(s) > 26:
		print('No')
	else:
		flag = True
		k = sorted(s)
		for j in range(len(k) - 1):
			if ord(k[j]) + 1 != ord(k[j + 1]):
				flag = False
				break
		if flag:
			print('Yes')
		else:
			print('No')


import string
str_dict = {s: i for (i, s) in enumerate(string.ascii_lowercase)}
n = input()
for i in range(int(n)):
	strings = input()
	input_set = list()
	if not strings:
		print('NO')
		continue
	answer = 'YES'
	strings = [s for s in strings]
	strings.sort()
	for i in range(len(strings) - 1):
		if str_dict[strings[i]] + 1 != str_dict[strings[i + 1]]:
			answer = 'NO'
			break
	print(answer)


class BreakLoops(BaseException):
	pass
num = input()
for i in range(int(num)):
	line_ = input()
	if len(line_) == 1:
		print('Yes')
	else:
		hist = [0 for i in range(26)]
		index = []
		try:
			for alpha in line_:
				ascii_ = ord(alpha) - 97
				hist[ascii_] += 1
				if hist[ascii_] > 1:
					print('No')
					raise BreakLoops()
				index.append(ascii_)
			index.sort(reverse=False)
			for i in range(len(index) - 1):
				if index[i] != index[i + 1] - 1:
					print('No')
					raise BreakLoops()
			print('Yes')
		except BreakLoops:
			continue


for i in range(int(input())):
	stri = list(input())
	stri.sort()
	flag = False
	for i in range(len(stri) - 1):
		if stri[i] == stri[i + 1] or ord(stri[i + 1]) != ord(stri[i]) + 1:
			print('No')
			flag = True
			break
	if not flag:
		print('Yes')


from collections import OrderedDict

def remove_duplicate(str1):
	return ''.join(OrderedDict.fromkeys(str1))
n = int(input())
c = 0
arr = []
for i in range(n):
	x = input()
	if len(x) == 1:
		print('YES')
	elif len(remove_duplicate(x)) == len(x):
		for t in range(len(x)):
			arr.append(ord(x[t]))
		if len(x) == max(arr) - min(arr) + 1:
			print('YES')
		else:
			print('NO')
		arr.clear()
	else:
		print('NO')


cases = int(input())
for i in range(cases):
	s = input()
	l = sorted(s)
	ss = set()
	for i in enumerate(l):
		ss.add(ord(i[1]) - i[0])
	if len(ss) == 1:
		print('Yes')
	else:
		print('No')


n = int(input())
ans = []
letter = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	ch = sorted(input())
	k = letter.index(ch[0])
	j = 0
	lon = len(ch)
	while j < lon and k < 26 and (letter[k] == ch[j]):
		j += 1
		k += 1
	if j == lon:
		ans.append('YES')
	else:
		ans.append('NO')
for elt in ans:
	print(elt)


def solve():
	for i in range(1, len(s)):
		if ord(a[i]) - ord(a[i - 1]) != 1:
			return 'No'
	return 'Yes'
n = int(input())
for _ in range(n):
	s = input()
	a = sorted(s)
	print(solve())


from collections import Counter

def diverse_string(x):
	if x is None:
		return 'No'
	if len(x) == 1:
		return 'Yes'
	sx = sorted(x)
	(flag1, flag2) = (True, True)
	for i in range(1, len(sx)):
		if abs(ord(sx[i - 1]) - ord(sx[i])) > 1:
			flag1 = False
	sxc = Counter(sx)
	val_list = list(sxc.values())
	for ele in val_list:
		if ele > 1:
			flag2 = False
	if flag1 and flag2:
		return 'Yes'
	else:
		return 'No'
n = int(input())
for _ in range(n):
	print(diverse_string(str(input())))


n = int(input())
for _ in range(n):
	s = input()
	s = list(sorted(list(s)))
	res = True
	for i in range(1, len(s)):
		if ord(s[i]) - ord(s[i - 1]) != 1:
			res = False
			break
	if res:
		print('Yes')
	else:
		print('No')


import sys
f = sys.stdin
t = int(f.readline().rstrip())
st = 'abcdefghijklmnopqrstuvwxyz'
for i in range(t):
	s = f.readline().rstrip()
	ns = sorted(s)
	ns1 = ''.join(ns)
	if ns1 in st:
		print('Yes')
	else:
		print('No')


def diff(s):
	arr = list(s)
	arr.sort()
	for i in range(1, len(arr)):
		if ord(arr[i]) - ord(arr[i - 1]) != 1:
			return False
	return True
n = int(input())
for i in range(n):
	s = input()
	if diff(s):
		print('Yes')
	else:
		print('No')


from math import *
x = input()
x = int(x)
s = []
for i in range(x):
	s.append(input())
for i in range(x):
	s[i] = sorted(s[i])
	counter = ord(s[i][0])
	if len(s[i]) == 1:
		print('Yes')
	for j in range(1, len(s[i])):
		if counter != ord(s[i][j]) - 1:
			print('No')
			break
		if counter == ord(s[i][j]) - 1 and j == len(s[i]) - 1:
			print('Yes')
			break
		counter = ord(s[i][j])


test_case = int(input())
for _ in range(test_case):
	string = sorted(input())
	print('YES' if ord(string[-1]) - ord(string[0]) + 1 == len(string) and len(string) == len(set(string)) else 'NO')


t = int(input())
for i in range(t):
	s = list(input())
	d = 0
	for i in range(len(s)):
		s[i] = ord(s[i])
	s = sorted(s)
	for i in range(len(s) - 1):
		if s[i + 1] - s[i] != 1 and d == 0:
			print('NO')
			d = 1
	if d != 1:
		print('YES')


n = int(input())
a = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(n):
	s = ''.join(sorted(input()))
	if s in a:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	a = sorted(map(ord, input()))
	print('Yes' if all((a[i] + 1 == a[i + 1] for i in range(len(a) - 1))) else 'No')


aa = 'abcdefghijklmnopqrstuvwxyz'
arr2 = list(aa)
for _ in range(int(input())):
	n = input()
	core = True
	arr = list(n)
	if len(arr) == len(set(arr)):
		arr.sort()
		for k in range(len(arr) - 1):
			if arr2.index(arr[k]) + 1 != arr2.index(arr[k + 1]):
				print('No')
				core = False
				break
		if core:
			print('Yes')
	else:
		print('No')


import string
n = int(input())
for i in range(n):
	word = input()
	max_val = -float('Inf')
	min_val = float('Inf')
	vocabulary = dict()
	vari = True
	for let in word:
		if let not in vocabulary:
			vocabulary[let] = 1
			index = string.ascii_lowercase.index(let)
			if index < min_val:
				min_val = index
			if index > max_val:
				max_val = index
		else:
			vari = False
			break
	if vari and max_val - min_val + 1 == len(word):
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	f = True
	for j in s:
		if s.count(j) > 1:
			f = False
			break
	if not f:
		print('No')
	else:
		s = [i for i in s]
		s.sort()
		if ord(s[-1]) - ord(s[0]) + 1 == len(s):
			print('Yes')
		else:
			print('No')


n = int(input())
strings = [input() for string in range(n)]
for string in strings:
	continueBool = True
	index = 0
	numbers = []
	minNumber = 1000
	maxNumber = 0
	while index < len(string) and continueBool:
		number = ord(string[index])
		if number > maxNumber:
			maxNumber = number
		if number < minNumber:
			minNumber = number
		if number in numbers:
			print('No')
			continueBool = False
		index = index + 1
		numbers.append(number)
	if continueBool == True:
		if maxNumber - minNumber + 1 == len(string):
			print('Yes')
		else:
			print('No')


N = int(input())

def diverse(t):
	t = sorted(t)
	for i in range(len(t)):
		if ord(t[i]) - ord(t[0]) != i:
			return 0
	return 1
for _ in range(N):
	if diverse(input()):
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	s = list(s)
	if len(set(s)) < len(s):
		print('No')
		continue
	s.sort()
	atual = s[0]
	flag = False
	for c in s[1:]:
		if ord(atual) != ord(c) - 1:
			print('No')
			flag = True
			break
		atual = c
	if flag:
		continue
	print('Yes')


n = int(input())
for i in range(n):
	s = input()
	s = sorted(s)
	sum = 0
	for j in range(len(s) - 1):
		if ord(s[j]) - 1 == ord(s[j + 1]) or ord(s[j]) + 1 == ord(s[j + 1]):
			sum = 0
		else:
			sum = 1
			break
	if sum == 0:
		print('Yes')
	else:
		print('No')


n = int(input())
for test in range(n):
	s = list(input())
	st = set(s)
	if len(st) != len(s):
		print('No')
	else:
		s = sorted(s)
		i = 1
		isit = True
		while i < len(s):
			if ord(s[i]) - ord(s[i - 1]) != 1:
				isit = False
				break
			else:
				i += 1
		if isit:
			print('Yes')
		else:
			print('No')


n = int(input())
alf = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	s = ''.join(sorted(input()))
	if len(set(s)) != len(s):
		print('no')
	elif s in alf:
		print('yes')
	else:
		print('no')


n = int(input())
s = ''
for i in range(n):
	s = input()
	s = sorted(s)
	flag = 1
	for j in range(1, len(s)):
		if not ord(s[j]) == ord(s[j - 1]) + 1:
			flag = 0
	for j in range(0, len(s)):
		if j < len(s) - 1:
			if s[j] in s[j + 1:]:
				flag = 0
		if s[j] in s[:j]:
			flag = 0
	if flag == 1:
		print('YES')
	else:
		print('NO')


def tonum(letter):
	if letter >= 'a' and letter <= 'z':
		return ord(letter) - 96
	else:
		return ord(letter) - 64
n = int(input())
for i in range(n):
	a = str(input())
	li = []
	for letter in a:
		li.append(tonum(letter))
	li.sort()
	flag = 1
	for i in range(len(a)):
		if li[i] == li[0] + i:
			continue
		else:
			flag = 0
			break
	if flag == 1:
		print('YES')
	else:
		print('NO')


import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
N = int(input())
ans = []

def solve(s):
	tmp = []
	for c in s:
		tmp.append(ord(c))
	tmp = sorted(tmp)
	if len(tmp) == 1:
		return 'Yes'
	else:
		for (a, b) in zip(tmp, tmp[1:]):
			if b - a != 1:
				return 'No'
	return 'Yes'
for _ in range(N):
	s = input()[:-1]
	ans.append(solve(s))
print('\n'.join(map(str, ans)))


def solve(s):
	s = sorted(list(s))
	if len(s) != len(set(s)):
		return 'No'
	if ord(s[-1]) - ord(s[0]) != len(s) - 1:
		return 'No'
	return 'Yes'
N = int(input())
for i in range(N):
	s = input()
	print(solve(s))


for i in range(int(input())):
	a = input()
	A = []
	c = 0
	for j in range(len(a)):
		A.append(ord(a[j]))
	A = sorted(A)
	for j in range(len(a) - 1):
		if A[j] + 1 != A[j + 1]:
			print('No')
			break
		else:
			c += 1
	if c == len(a) - 1:
		print('Yes')


import string

def check_order(s):
	alphabet = list(string.ascii_lowercase)
	n = alphabet.index(s[0])
	k = True
	for i in range(0, len(s)):
		k = k and i + n < 26 and (s[i] == alphabet[i + n])
	return k
tests = int(input())
while tests > 0:
	tests = tests - 1
	s = input()
	s = sorted(s)
	print('Yes') if check_order(s) else print('No')


n = int(input())
for i in range(n):
	m = input()
	a = 0
	cor = 0
	while chr(ord(m[a]) + 1) in m:
		cor += 1
		a = m.find(chr(ord(m[a]) + 1))
	a = 0
	while chr(ord(m[a]) - 1) in m:
		cor += 1
		a = m.find(chr(ord(m[a]) - 1))
	if cor == len(m) - 1:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	s = input()
	if len(set(s)) < len(s):
		print('No')
	elif ord(max(s)) - ord(min(s)) + 1 == len(s):
		print('Yes')
	else:
		print('No')


t = int(input())
a = 'abcdefghijklmnopqrstuvwxyz'
for k in range(t):
	s = input()
	l = list(set(s))
	x = a[a.index(min(s)):a.index(min(s)) + len(s)]
	if len(l) == len(s):
		c = 0
		for i in s:
			if i in x:
				c += 1
		if c == len(s):
			print('Yes')
		else:
			print('No')
	else:
		print('No')


R = lambda : map(int, input().split())
n = [*R()][0]
for _ in range(n):
	s = input()
	l = list(sorted(set([x for x in s])))
	if len(s) != len(l):
		print('nO')
	else:
		print('yEs' if sum((ord(l[i]) - ord(l[i - 1]) for i in range(1, len(l)))) == len(s) - 1 else 'No')


n = int(input())
for _ in range(n):
	s = input()
	if len(s) == 1:
		print('YES')
		continue
	arr = []
	for word in s:
		arr.append(ord(word))
	no = False
	arr.sort(reverse=True)
	for i in range(1, len(arr)):
		if arr[i - 1] - arr[i] > 1:
			no = True
			break
		if arr[i - 1] - arr[i] == 0:
			no = True
			break
	if no:
		print('NO')
		continue
	else:
		print('YES')
		continue


n = int(input())
for _ in range(n):
	s = list(input())
	s.sort()
	c = 0
	for i in range(1, len(s)):
		if ord(s[i]) == ord(s[i - 1]) + 1:
			c += 1
	if c == len(s) - 1:
		print('Yes')
	else:
		print('No')


def right_order(arr):
	for i in range(1, len(arr)):
		if arr[i] - arr[i - 1] != 1:
			return 'No'
	return 'Yes'
for i in range(int(input())):
	temp = input()
	l = []
	flag = 'Yes'
	l.append(ord(temp[0]))
	for j in range(1, len(temp)):
		if ord(temp[j]) in l:
			flag = 'No'
			break
		l.append(ord(temp[j]))
	if flag != 'No':
		flag = right_order(sorted(l))
	print(flag)


n = int(input())
while n:
	s = str(input())
	l = [ord(x) for x in s]
	l.sort()
	k = 0
	for i in range(len(l) - 1):
		if l[i + 1] - l[i] != 1:
			k = 1
			break
	if k == 0:
		print('Yes')
	else:
		print('No')
	n -= 1


n = int(input())
for _ in range(n):
	s = input()
	d = []
	for c in s:
		d.append(ord(c) - ord('a'))
	d.sort()
	for (i, t) in enumerate(d[1:], 1):
		if t - d[i - 1] != 1:
			print('No')
			break
	else:
		print('Yes')


n = int(input())
for _ in range(n):
	line = list(input())
	line.sort()
	if len(line) == 1:
		print('Yes')
	else:
		div = True
		for i in range(1, len(line)):
			if ord(line[i]) - ord(line[i - 1]) != 1:
				div = False
				break
		print('Yes' if div else 'No')


a = int(input())
for i in range(a):
	s = input()
	ans = []
	for i in range(len(s)):
		ans.append(s[i])
	ans = sorted(ans)
	if len(ans) != len(list(set(ans))):
		print('No')
		continue
	else:
		flag = 0
		for i in range(1, len(ans)):
			if ord(ans[i]) - ord(ans[i - 1]) == 1:
				continue
			else:
				flag = 1
				break
		if flag == 1:
			print('No')
		else:
			print('Yes')


letters = ['', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
n = int(input())
result = ['' for i in range(n)]
for i in range(n):
	strings = input().lower()
	coding = [0 for k in range(len(strings))]
	for (index, letter) in enumerate(strings):
		if letters.index(letter) not in coding:
			coding[index] = letters.index(letter)
	coding.sort()
	if 0 in coding:
		result[i] = 'No'
	elif coding[-1] - coding[0] == len(strings) - 1:
		result[i] = 'Yes'
	else:
		result[i] = 'No'
for outp in result:
	print(outp)


n = int(input())
for _ in range(n):
	s = input()
	l_s = list(s)
	l_s.sort()
	if ord(l_s[-1]) - ord(l_s[0]) == len(s) - 1:
		a = l_s[0]
		yes = True
		for i in range(1, len(s)):
			if a == l_s[i]:
				yes = False
				break
			else:
				a = l_s[i]
		print('Yes') if yes else print('No')
	else:
		print('No')


n = int(input())
while n != 0:
	t = True
	x = list(input())
	l1 = list(dict.fromkeys(x))
	l1.sort()
	if len(l1) == len(x):
		for i in range(len(l1) - 1):
			if ord(l1[i]) + 1 != ord(l1[i + 1]):
				print('No')
				t = False
				break
		if t == True:
			print('Yes')
	else:
		print('No')
	n = n - 1


t = int(input())
for _ in range(t):
	count = 0
	s = input()
	s = sorted(s)
	for i in range(1, len(s)):
		if s[i] == chr(ord(s[i - 1]) + 1):
			count += 1
	if count == len(s) - 1:
		print('Yes')
	else:
		print('No')


n = int(input())
for i in range(n):
	s = input()
	visited = [False for _ in range(26)]
	ok = True
	for c in s:
		if visited[ord(c) - 97]:
			print('No')
			ok = False
			break
		else:
			visited[ord(c) - 97] = True
	if ok:
		consecutive = True
		state = 0
		for i in range(26):
			if visited[i]:
				state += 1
			if state > 0 and (not visited[i]):
				print('No')
				consecutive = False
				break
			if state == len(s):
				break
		if consecutive:
			print('Yes')


abc = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(int(input())):
	in_val = input()
	if len(set(in_val)) != len(in_val):
		print('No')
		continue
	data = sorted(in_val)
	for i in range(len(data) - 1):
		if ord(data[i + 1]) != ord(data[i]) + 1:
			print('No')
			break
	else:
		print('Yes')


def div(l):
	j = t = 0
	while j < 26:
		if l[j] > 1:
			return 'No'
		if t == 1 and l[j] == 0:
			j += 1
			break
		t = l[j]
		j += 1
	while j < 26:
		if l[j] != 0:
			return 'No'
		j += 1
	return 'Yes'
oa = ord('a')
for i in range(int(input())):
	l = [0 for i in range(26)]
	for c in input():
		l[ord(c) - oa] += 1
	print(div(l))


z = input
for _ in range(int(z())):
	l = sorted(z())
	c = ord(l[0])
	t = len(l)
	(j, d) = (0, 0)
	for i in range(c, c + t):
		if chr(i) != l[j]:
			print('NO')
			d = 1
			break
		j += 1
	if d == 0:
		print('YES')


for _ in range(int(input())):
	s = input()
	l = list(set([i for i in s]))
	l.sort()
	if len(l) == len(s) and ord(l[-1]) - ord(l[0]) == len(s) - 1:
		print('Yes')
	else:
		print('No')


n = int(input())
result = []
for i in range(n):
	s = list(input())
	s.sort()
	c1 = len(s) == len(list(set(s)))
	c2 = ord(s[len(s) - 1]) - ord(s[0]) == len(s) - 1
	result.append('Yes' if c1 and c2 else 'No')
print(*result, sep='\n')


t = int(input())
for _ in range(t):
	s = input()
	l = [0] * 26
	n = len(s)
	f = 0
	for i in range(n):
		x = ord(s[i]) - 97
		if l[x] == 0:
			l[x] = 1
		else:
			f = 1
			print('No')
			break
	if f == 0:
		for i in range(26):
			l[i] = str(l[i])
		l = ''.join(l)
		c1 = l.count('01')
		c2 = l.count('10')
		if c1 > 1 or c2 > 1:
			print('No')
		elif c1 == 0 or c2 == 0:
			print('Yes')
		else:
			i1 = l.index('01')
			i2 = l.index('10')
			if i1 < i2:
				print('Yes')
			else:
				print('No')


t = int(input())
l = []
ans = []
for i in range(t):
	temp = input()
	l.append(temp)
for i in l:
	ans = []
	if len(set(i)) != len(i):
		print('No')
	elif len(i) == 1:
		print('Yes')
	else:
		i = sorted(i)
		for j in range(len(i) - 1):
			if ord(i[j]) + 1 == ord(i[j + 1]):
				ans.append('Yes')
			elif ord(i[j]) + 1 != ord(i[j + 1]):
				ans.append('No')
		if 'No' in ans:
			print('No')
		else:
			print('Yes')


m = int(input())
s = ''
for k in range(0, m):
	s = input()
	b = sorted(s)
	k = [ord(x) for x in b]
	sum = 0
	tot_sum = 0
	for i in k:
		sum = sum + i
	for j in range(0, len(s)):
		tot_sum = tot_sum + j + k[0]
	if tot_sum != sum or len(s) != len(set(s)):
		print('NO')
	else:
		print('YES')


t = int(input())
while t > 0:
	s = input()
	(n, m) = ([], [])
	f = 1
	for i in s:
		n.append(i)
	n.sort()
	if len(n) == 1:
		print('YES')
	else:
		for i in range(len(n)):
			m.append(ord(n[i]) - ord('a'))
		for i in range(len(m) - 1):
			if m[i] + 1 == m[i + 1]:
				f = 1
			else:
				f = 0
				break
		if f == 1:
			print('YES')
		else:
			print('NO')
	t -= 1


def ans(s):
	s = [ord(x) - 97 for x in s]
	if len(set(s)) < len(s):
		return 'no'
	elif min(s) + len(s) == max(s) + 1:
		return 'yes'
	else:
		return 'no'
N = input()
inn = []
for i in range(int(N)):
	s = input()
	inn.append(s)
for s in inn:
	print(ans(s))


n = int(input())
a = [input() for i in range(n)]
for i in a:
	res = []
	for j in i:
		res.append(ord(j))
	res.sort()
	Result = True
	for j in range(1, len(res)):
		if res[j] != res[j - 1] + 1:
			Result = False
			break
	if Result:
		print('Yes')
	else:
		print('No')


def is_diverse(s):
	return len(set(s)) == len(s) and ord(max(s)) - ord(min(s)) == len(s) - 1
t = int(input())
for _ in range(t):
	s = input()
	if is_diverse(s):
		print('Yes')
	else:
		print('No')


t = int(input())

def check(s):
	for i in range(len(s) - 1):
		if ord(s[i + 1]) - ord(s[i]) != 1:
			return False
	return True
for _ in range(t):
	s = sorted(list(input()))
	res = 'Yes' if check(s) else 'No'
	print(res)


N = int(input())
for _ in range(N):
	s = list(input())
	s.sort()
	sz = len(s)
	s = list(dict.fromkeys(s))
	if len(s) == sz and ord(s[-1]) - ord(s[0]) + 1 == sz:
		print('Yes')
	else:
		print('No')


a = [i for i in 'abcdefghijklmnopqrstuvwxyz']
d = {}
for (i, n) in enumerate(a):
	d[n] = i
n = int(input())
for i in range(n):
	s = input()
	print('yes' if d[max(s)] - d[min(s)] + 1 == len(s) and len(s) == len(set(s)) else 'no')


n = int(input())
for i in range(n):
	x = input()
	y = set(x)
	d = sorted(x)
	if len(y) == len(x) and ord(d[-1]) - ord(d[0]) == len(x) - 1:
		print('Yes')
	else:
		print('No')


for __ in range(int(input())):
	s = sorted([ord(a) - 97 for a in input()])
	flag = True
	for i in range(len(s) - 1):
		if s[i + 1] - s[i] != 1:
			flag = False
			break
	if flag:
		print('Yes')
	else:
		print('No')


n = int(input())
alpha = ' abcdefghijklmnopqrstuvwxyz '
ans = ['No' for i in range(n)]
for i in range(n):
	m = input()
	seta = list(set(m))
	seta.sort()
	new = ''
	for j in seta:
		new = new + j
	if new in alpha:
		ans[i] = 'Yes'
	for j in m:
		if m.count(j) > 1:
			ans[i] = 'No'
			break
	if len(m) == 1:
		ans[i] = 'Yes'
for i in ans:
	print(i)


n = int(input())
for i in range(n):
	s = input()
	alf = [0 for i in range(26)]
	for j in s:
		alf[ord(j) - ord('a')] += 1
	r = len(s)
	if max(alf) != 1:
		print('NO')
		continue
	for j in range(len(alf) - 1, -1, -1):
		if alf[j] == 1:
			r = j
			break
	if r - alf.index(1) + 1 == sum(alf):
		print('YES')
	else:
		print('NO')


n = int(input())
for i in range(n):
	lis = input()
	li = sorted(lis)
	l = len(li)
	flag = 0
	for j in range(l - 1):
		if ord(li[j + 1]) - ord(li[j]) != 1:
			flag = 1
			print('No')
			break
	if flag == 0:
		print('Yes')


q = int(input())
for _ in range(q):
	d = sorted(list(input()))
	if len(d) == 1:
		print('YES')
		continue
	ans = True
	for i in range(1, len(d)):
		if ord(d[i]) - ord(d[i - 1]) != 1:
			ans = False
			break
	if ans:
		print('YES')
	else:
		print('NO')


t = int(input())
for _ in range(t):
	s = input('')
	l = list(s)
	se = set(l)
	flag = 0
	if len(se) == len(l):
		l.sort()
		for i in range(len(l) - 1):
			if ord(l[i + 1]) - ord(l[i]) == 1:
				continue
			else:
				flag = 1
				break
		if flag == 0:
			print('Yes')
		else:
			print('No')
	else:
		print('No')


ll = lambda : list(map(int, input().split()))
for _ in range(int(input())):
	s = input()
	s = list(s)
	s.sort()
	if len(s) == 1:
		print('Yes')
	else:
		flag = 0
		for i in range(1, len(s)):
			if s[i] == s[i - 1] or ord(s[i]) != ord(s[i - 1]) + 1:
				flag = 1
				break
		print('Yes' if flag == 0 else 'No')


n = int(input())
for j in range(n):
	a = list(input())
	al = len(a)
	b = list(set(a))
	bl = len(b)
	b.sort()
	if al == bl:
		count = 0
		for i in range(bl - 1):
			if ord(b[i]) + 1 == ord(b[i + 1]):
				count += 1
		if count == bl - 1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


for _ in range(int(input())):
	s = list(input())
	k = list(set(s))
	a = len(s)
	b = len(k)
	if a != b:
		print('No')
	else:
		k.sort()
		c = 0
		for i in range(b - 1):
			if ord(k[i + 1]) - ord(k[i]) == 1:
				c += 1
			else:
				break
		if c == b - 1:
			print('Yes')
		else:
			print('No')


n = int(input())
y = 0
s_new = ''
alf = 'abcdefghijklmnopqrstuvwxyz'
for i in range(n):
	k = 0
	s = input()
	s_new = ''
	for i in range(len(s)):
		if s_new.find(s[i]) == -1 and s[i] != ' ':
			s_new += s[i]
	s1 = ''.join(sorted(s))
	g = alf.find(s1, 0, len(alf))
	if g != -1 and s == s_new:
		print('Yes')
	else:
		print('No')


ll = 'abcdefghijklmnopqrstuvwxyz'
for u in range(int(input())):
	s = input()
	l = list(s)
	l.sort()
	n = len(s)
	s = ''.join(l)
	x = ll.index(s[0])
	ss = ll[x:x + n]
	if ss == s:
		print('Yes')
	else:
		print('No')


import sys
import math
import bisect

def main():
	for _ in range(int(input())):
		A = list((ord(c) - ord('a') for c in input()))
		n = len(A)
		A = list(sorted(set(A)))
		A.sort()
		if len(A) == n and A[-1] - A[0] == n - 1:
			print('Yes')
		else:
			print('No')
main()


l = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
n = int(input())
for i in range(n):
	a = input()
	s = set(a)
	g = len(s)
	flag = 0
	ind = []
	if len(a) != len(s):
		flag = 1
		print('No')
	else:
		for j in range(g):
			ind.append(l.index(a[j]))
		ind.sort()
		for j in range(1, g):
			if ind[j] - ind[j - 1] != 1:
				flag = 2
				break
		if flag == 0 or g == 1:
			print('Yes')
		else:
			print('No')


n = int(input())
for i in range(n):
	strings = []
	c = input()
	for j in range(len(c)):
		strings.append(ord(c[j]))
	strings.sort()
	if len(c) == strings[-1] - strings[0] + 1 and len(c) == len(list(set(c))):
		print('Yes')
	else:
		print('No')


def isdiverse(s):
	l = len(s)
	if l == 1:
		return 'yes'
	if l > 26:
		return 'no'
	ss = sorted(s)
	for i in range(len(ss) - 1):
		if ord(ss[i + 1]) - ord(ss[i]) != 1:
			return 'no'
	return 'yes'
N = int(input())
for i in range(N):
	s = str(input())
	print(isdiverse(s))


for j in range(int(input())):
	a = list(input())
	a.sort()
	if len(set(a)) != len(a):
		print('NO')
	else:
		h = 0
		g = ord(a[0])
		for k in range(1, len(a)):
			if ord(a[k]) == g + 1:
				g = ord(a[k])
			else:
				print('NO')
				h += 1
				break
		if h == 0:
			print('YES')


def diversestring(string):
	diverse = bool(0)
	for a in range(len(string)):
		string[a] = ord(string[a])
	string.sort()
	for b in range(len(string) - 1):
		if string[b] + 1 != string[b + 1]:
			return 'No'
		else:
			pass
	return 'Yes'
n = int(input())
strings = []
for i in range(n):
	strings.append([str(x) for x in input()])
answer = []
for word in range(n):
	answer.append(diversestring(strings[word]))
for item in answer:
	print(item)


def isStringDiverse(wordList):
	for word in wordList:
		s = set(word)
		if len(word) != len(s):
			print('NO')
		else:
			ll = [x for x in word]
			ll.sort()
			isDiverse = True
			for i in range(len(ll)):
				if i > 0 and ord(ll[i]) != ord(ll[i - 1]) + 1:
					print('NO')
					isDiverse = False
					break
			if isDiverse:
				print('YES')
ip = int(input())
wordlist = []
for ip in range(ip):
	wordlist.append(input())
isStringDiverse(wordlist)


n = int(input())
for i in range(n):
	a = [0] * 26
	s = input()
	for i in range(len(s)):
		a[ord(s[i]) - 97] += 1
	f = 0
	ch = 0
	cnt = 0
	for i in range(26):
		if a[i] == 0:
			if f == 0:
				continue
			else:
				break
		elif a[i] > 1:
			ch = 1
			break
		elif cnt == 0 or f == 1:
			cnt += 1
			f = 1
	if cnt == len(s):
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	f = False
	word = list(input())
	word.sort()
	for i in range(1, len(word)):
		if ord(word[i]) - ord(word[i - 1]) != 1:
			f = True
			break
	if not f:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	s = input()
	s = sorted(s)
	ans = True
	for j in range(len(s) - 1):
		ans = ans and ord(s[j + 1]) - ord(s[j]) == 1
	print('Yes' if ans else 'No')


n = int(input())
l = []
while n != 0:
	s = input()
	ss = sorted(s)
	tf = 1
	for i in range(0, len(ss) - 1):
		if ord(ss[i + 1]) - 1 != ord(ss[i]):
			print('NO')
			tf = 0
			break
	if tf == 1:
		print('YES')
	n -= 1


def isDiverse(s):
	for i in range(len(s) - 1):
		if chr(ord(s[i]) + 1) == s[i + 1]:
			continue
		else:
			return 0
	return 1
for i in range(int(input())):
	s = sorted(list(input()))
	print(['No', 'Yes'][isDiverse(s)])


def judge(s):
	temp = []
	for i in s:
		temp.append(ord(i))
	temp.sort()
	for i in range(len(temp) - 1):
		if temp[i] + 1 != temp[i + 1]:
			return 'No'
	return 'Yes'
n = int(input())
st = []
for i in range(n):
	st.append(input())
for i in st:
	print(judge(i))


for i in range(int(input())):
	a = sorted(map(ord, input()))
	if len(a) == len(set(a)) == max(a) - min(a) + 1:
		print('YES')
	else:
		print('NO')


N = int(input())
ss = ''.join([chr(ord('a') + i) for i in range(26)])
for i in range(N):
	s = input()
	if ''.join(sorted(s)) in ss:
		print('Yes')
	else:
		print('No')


def calc(x):
	lis = list(x)
	lis.sort()
	for i in range(1, len(lis)):
		if ord(lis[i]) - ord(lis[i - 1]) != 1:
			print('No')
			return
	print('Yes')
n = int(input())
for i in range(n):
	d = input()
	calc(d)


def check_diverse(s):
	if len(s) == 1:
		return True
	if len(s) == len(set(s)):
		ords = [ord(ch) for ch in s]
		min_ords = min(ords)
		max_ords = max(ords)
		if max_ords - min_ords + 1 == len(s):
			return True
		else:
			return False
	else:
		return False
for _ in range(int(input())):
	s = input()
	if check_diverse(s):
		print('Yes')
	else:
		print('No')


a = 'abcdefghijklmnopqrstuvwxyz'
n = int(input())
for _ in range(n):
	s = input()
	l = list(s)
	l.sort()
	s1 = set(l)
	if len(s1) != len(l):
		print('NO')
	elif a.index(l[0]) + len(s) - 1 != a.index(l[-1]):
		print('NO')
	else:
		print('YES')


t = int(input())
while t:
	s = input()
	n = len(s)
	if n == len(set(s)):
		s = sorted(s)
		for i in range(n - 1):
			if ord(s[i]) + 1 != ord(s[i + 1]):
				print('No')
				break
		else:
			print('Yes')
	else:
		print('No')
	t -= 1


n = int(input())
for i in range(n):
	w = input()
	l = list(w)
	l.sort()
	w = ''.join(l)
	fl = True
	for i in range(len(w)):
		if i > 0 and ord(w[i]) - ord(w[i - 1]) != 1:
			fl = False
			print('No')
			break
	if fl:
		print('Yes')