cases = int(raw_input())
for case in xrange(cases):
	num_towns = int(raw_input())
	towns = []
	for t in xrange(num_towns):
		towns.append(raw_input()[0])
	print 'YES' if len(towns) == len(set(towns)) else 'NO'