#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, m, max = 0;
    cin >> n;
    m = n;
    bool flag = true;
    int a[26] = {0};
    while (n--) {
      string s;
      cin >> s;
      for (int i = 0; i < s.length(); i++) {
        a[s[i] - 'a']++;
        if ((s[i] - 'a') > max) max = s[i] - 'a';
      }
    }
    for (int i = 0; i < max + 1; i++) {
      if (a[i] == 0)
        continue;
      else if (a[i] < m || a[i] % m != 0) {
        cout << "NO" << endl;
        flag = false;
        break;
      }
    }
    if (flag) {
      cout << "YES" << endl;
    }
  }
  return 0;
}
