fh = ['~','!','@','#','$','%','^'] num = [str(i) for i in range(10)] letA=[] for i in range(65,91): letA.append(chr(i)) leta = [i.lower() for i in letA] def lenx(x): if 8 <= len(x) <= 16: return 1 else: return 0 def isornot(x): s=j=k=l= 0 for i in x: if i in fh: s += 1 break for i in x: if i in num: j += 1 break for i in x: if i in letA: k += 1 break for i in x: if i in leta: l +=1 break zong = s+j+k+l if s+j+k+l >=3: return 1 else: return 0 n = int(input()) for i in range(n): m = input() if lenx(m) + isornot(m) == 2: print('YES') else: print('NO')
0.0分
0 人评分