for _ in range(input()):
	alpha = "abcdefghijklmnopqrstuvwxyz"
	freq = {}
	for a in alpha:
		freq[a] = 0
	flag = True
	for _ in range(input()):
		n = raw_input()
		freq[n[0]]+=1
	for a in freq:
		if freq[a]>1:
			flag = False
			break
	if flag:
		print "YES"
	else:
		print "NO"