for _ in range(int(raw_input())):
    s=[]
    n=int(raw_input())
    for j in range(n):
        s.append(raw_input()[0])
    if len(s)==len(set(s)):
        print("YES")
    else:
        print("NO")