for i in range(input()):
	li=[]
	n=int(input())
	cnt=0
	for j in range(n):
		st=raw_input()
		kt=st[0]
		if kt in li:
			cnt=1
		else:
			li.append(kt)
	
	if cnt == 0:
		print "YES"
	else:
		print "NO"