'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
#print 'Hello World!'
t=int(raw_input())
while t>0:
	t-=1
	n=int(raw_input())
	l=[]
	while n>0:
		n-=1
		x=raw_input()
		l.append(x[0])
	if len(l)==len(set(l)):
		print"YES"
	else:
		print"NO"