'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''

from sys import stdin

no_test_cases = int(stdin.readline())

for _ in range(no_test_cases):
	no_cities = int(raw_input())
	cities = []
	for _ in range(no_cities):
		city  = raw_input()
		cities.append(city[0])
	if no_cities == len(set(cities)):
		print 'YES'
	else:
		print 'NO'