t = input()
for i in range(t):
    n = input()
    c = []
    co = 0
    for j in range(n):
        a = raw_input()
        if(a[0] not in c):
            c.append(a[0])
        co = co + 1
    if len(c) == n:
        print "YES"
    else:
        print "NO"