from sys import stdin
t = int(stdin.readline())
for _ in xrange(t):
	n = int(stdin.readline())
	s = set()
	for i in xrange(n):
		a = stdin.readline()
		s.add(a[0])
	if len(s)==n:
		print 'YES'
	else:
		print 'NO'