# Bob's Journey

if __name__=='__main__':
    t=int(raw_input())
    while(t):
        k=int(raw_input())
        ls=[]
        while(k):
            c=raw_input()
            ls.append(c[0])
            k=k-1
        ls.sort()
        ch=''
        flag=True
        for i in ls:
            if i !=ch :
                ch=i
            else:
                flag=False
                break
        if flag:
            print "YES"
        else:
            print "NO"
        t=t-1