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

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
#print 'Hello World!'
def isDistinct(citiesList):
	citiesSet=set()
	for city in citiesList:
		citiesSet.add(city[0])
	return 'YES' if len(citiesList)==len(citiesSet) else 'NO'
t=int(raw_input())
for i in range(t):
	n=int(raw_input())
	cities=[]
	for j in range(n):
		cities.append(raw_input())
	print isDistinct(cities)