nos=int(raw_input())
for s in range(nos):
    no=int(raw_input())
    l=[]
    for i in range(no):
        city=raw_input()
        if city[0:1] not in l:
            l.append(city[0:1])
    if len(l)==no:
        print "YES"
    else:
        print "NO"