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

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

test_case_count = int(raw_input())
if test_case_count>100 or test_case_count<1:
	sys.exit(1)

city_list=[]
distinct_dict={}

for i in range(test_case_count):

	no_of_cities = int(raw_input())
	if no_of_cities > 1000 or no_of_cities<1:
		sys.exit(1)
	
	for city in range(no_of_cities):
		city_name = raw_input()
		if len(city_name)>10 or len(city_name)<1:
			sys.exit(1)
		city_list.append(city_name)
	
	for eachCity in city_list:
		if eachCity[0] in distinct_dict:
			distinct = False
			break
		else:
			distinct_dict[eachCity[0]]= 1
			distinct = True
	if distinct:
		print 'YES'
	else:
		print 'NO'
	distinct_dict.clear()
	city_list[:]=[]