t=input()
while t:
	n = input()
	lst=[]
	flag=1
	for a in range(n):
		f= raw_input()
		item = f[ :1]
		lst.append(item)
		c=lst.count(item)
		if c==2:
			flag = 0
	if flag:
		print "YES"
	else:
		print "NO"
	t=t-1