def getSol(cities):
    cityMap={}
    
    for city in cities:
        key=city[0]
        count=cityMap.get(key,0)
        if count>0 :
            return "NO"
        else:
            cityMap[key]=1
    return "YES"        
    
    
T=int(raw_input())
for _ in xrange(0,T):
    N=int(raw_input())
    cities=[raw_input() for x in  xrange(0,N)]
    print getSol(cities)