n=int(raw_input());
r={};
i=0;
while i<n:
    c=int(raw_input());
    dx={};
    j=0;
    r[i]="YES";
    while j<c:
        ct=raw_input();
        if ct[0] in dx:
            dx[ct[0]]+=1;
            if dx[ct[0]]>1:
                r[i]="NO";
        else:
            dx[ct[0]]=1;
        j+=1;
    i+=1;

for i in r:
    print(r[i]);