#include <bits/stdc++.h>
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    char s[n][1002];
    int i, j, sum = 0, l;
    for (i = 0; i < n; i++) {
      scanf(" %s", &s[i]);
      l = strlen(s[i]);
      sum += l;
    }
    int num[26] = {0};
    if (sum % n != 0) {
      printf("NO\n");
    } else {
      for (i = 0; i < n; i++) {
        int ll;
        ll = strlen(s[i]);
        for (j = 0; j < ll; j++) {
          if (s[i][j] == 'a') num[0]++;
          if (s[i][j] == 'b') num[1]++;
          if (s[i][j] == 'c') num[2]++;
          if (s[i][j] == 'd') num[3]++;
          if (s[i][j] == 'e') num[4]++;
          if (s[i][j] == 'f') num[5]++;
          if (s[i][j] == 'g') num[6]++;
          if (s[i][j] == 'h') num[7]++;
          if (s[i][j] == 'i') num[8]++;
          if (s[i][j] == 'j') num[9]++;
          if (s[i][j] == 'k') num[10]++;
          if (s[i][j] == 'l') num[11]++;
          if (s[i][j] == 'm') num[12]++;
          if (s[i][j] == 'n') num[13]++;
          if (s[i][j] == 'o') num[14]++;
          if (s[i][j] == 'p') num[15]++;
          if (s[i][j] == 'q') num[16]++;
          if (s[i][j] == 'r') num[17]++;
          if (s[i][j] == 's') num[18]++;
          if (s[i][j] == 't') num[19]++;
          if (s[i][j] == 'u') num[20]++;
          if (s[i][j] == 'v') num[21]++;
          if (s[i][j] == 'w') num[22]++;
          if (s[i][j] == 'x') num[23]++;
          if (s[i][j] == 'y') num[24]++;
          if (s[i][j] == 'z') num[25]++;
        }
      }
      int f = 0;
      for (i = 0; i < 26; i++) {
        if (num[i] != 0) {
          if (num[i] % n != 0) {
            printf("NO\n");
            f = 1;
            break;
          }
        }
      }
      if (f == 0) {
        printf("YES\n");
      }
    }
  }
}
