t=int(raw_input())
while t>0:
	t-=1
	n=int(raw_input())
	a=[]
	while n>0:
		s=raw_input()
		a.append(s[0])
		n-=1
	i=0
	cnt=0
	n=len(a)-1
	while i<=n:
		j=i+1
		while j<=n:
			if a[i]==a[j]:
				cnt+=1
			j+=1
		i+=1
	if cnt==0:
		print 'YES'
	else:
		print 'NO'