t = int(input())

while t:
    citylist=[]
    n = int(input())
    while n:
        citylist.append(raw_input())
        n-=1
    flag = True
    for i in range(len(citylist)-1):
        for j in range(i+1,len(citylist)):
            if citylist[i][0] == citylist[j][0]:
                flag = False
                break
    if flag :
        print("YES")
    else :
        print("NO")
    t-=1