tc=input()
lr=[]
while tc>0:
	l=[]
	flag=False
	num=input()
	while num>0:
	    st=raw_input()
	    if st[0] not in l:
	    	l.append(st[0])
	    	#print l
	    else:
	    	flag=True
	    num=num-1
	if flag==True:
		lr.append("NO")
	else:
		lr.append("YES")
	tc=tc-1
for i in lr:
	print i