test = int(raw_input())
while test:
    n = int(raw_input())
    arr = []
    for i in range(n):
        city = raw_input()
        arr.append(city[0])
    if len(set(arr)) == len(arr):
        print "YES"
    else:
        print "NO"
    test -= 1