def bob():
	cases=raw_input()
	list1=[]
	for i in range(int(cases)):
		cname=raw_input()
		list1.append(str(cname[0]))
		list1.sort()
	for i in range(0,len(list1)-1,1):
		if list1[i]==list1[i+1]:
			print("NO")
			return True
			
	print("YES")
if __name__ == '__main__':
   t = int(raw_input())
   for i in xrange(t):
       bob()