Python代码:
n=int(input())
for i in range(n):
key=input()
count=1
if key.isalnum()==False:
count=0
elif key[0].isdigit()==True:
count=0
elif key.islower()==True or key.isupper()==True or key.isdigit()==True:
count=0
elif len(key)<8 or len(key)>100:
count=0
if count:
print("YES")
else:
print("NO")