test=int(raw_input())
while(test):
	test-=1
	l=[0 for _ in range(26)]
	n=int(raw_input())
	while(n):
		flag=0
		n-=1
		str=raw_input()
		l[ord(str[0])-97]+=1
	for i in xrange(26):
		if(l[i]>1):
			flag=1
			print "NO"
			break
	if(flag==0):
		print "YES"