t= int(input()) import string for i in range(t): problem = input() if "".join(sorted(problem)) == "ABCDEFGHIJKLM": print("YES") else: print("NO")