Source Code
t= int(input())
import string
prohibited = string.ascii_uppercase[12:]
# print (prohibited)
for i in range (t):
	problem = input()
	check = any(item in prohibited for item in problem)

	if check:
		print ("NO")
	else:
		print("YES")
Copy
Well-indexed? acaard
Python 3
58 ms
4.0 MB
Wrong Answer