#link :- https://www.hackerearth.com/kyazoonga-hiring-challenge/algorithm/bobs-journey-5/
tstcase = int(raw_input())
for x in range(tstcase):
	lst = []
	ans = "YES"
	y = int(raw_input())
	for _ in range(y):
		str1 = raw_input()
		lst.append(str1[0])

	for y1 in lst:
		if lst.count(y1) > 1:
			ans = "NO"
			break
	print ans