t = int(raw_input())
for i in range(t):
	n = int(raw_input())
	S = set([])
	ok = 1
	for j in range(n):
		ch = str(raw_input()[0])
		if ch in S:
			ok = 0
		else:
			S.add(ch)
	print "YES" if ok else "NO"