n = int(raw_input())
for i in range(n):
    m = int(raw_input())
    names = ''
    answer = 'YES'
    for j in range(m):
        city_name = str(raw_input())
        if len(city_name) > 0:
            if city_name[:1] not in names:
                names = names + city_name[:1]
            else:
                answer = 'NO'
    print(answer)