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

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
testcases = int(raw_input())
result = []
for val in range(1,testcases+1):
	cities_count = int(raw_input())
	bob_cities=[]
	duplicate = True
	for city in range(1,cities_count+1):
		city = raw_input()
		if city[0] not in bob_cities and duplicate:
			bob_cities.append(city[0])
		else:
			duplicate = False
	if cities_count == len(bob_cities):
		result.append("YES")
	else:
		result.append("NO")
for val in result:
	print val