for _ in range(input()):
	li = [0]*26
	i = input()
	for x in range(0,i):
		li[ord(raw_input()[0])-97]+=1
	get = True
	for x in range(0,26):
		if li[x]>=2:
			get = False
	if get:
		print "YES"
	else:
		print "NO"