alp = "abcdefghijklmnopqrstuvwxyz"
tc = int(raw_input())
l = []
for i in range(0, tc):
	del l[:]
	n = int(raw_input())
	for j in range(0, n):
		s = raw_input()
		l.append(s[0])
	if len(l) != len(set(l)):
		print "NO"
	else:
		print "YES"