t=input()
for x in range(0,t):
    n=input()
    l=[]
    d=[]
    for i in range(0,n):
        n=raw_input()
        l.append(n)
        d.append(n[0])
    ans=0
    for each in d:
        if d.count(each)>1:
            ans=1
            break
    if ans==1:
        print 'NO'
    else:
        print 'YES'