#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long MAX = 2e5 + 10;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<string> s(n);
    vector<int> cnt(30, 0);
    int to = 0;
    for (auto i = 0; i < n; i++) {
      cin >> s[i];
      for (auto j = 0; j < s[i].size(); j++) cnt[s[i][j] - 'a']++, to++;
    }
    if (to % n != 0) {
      cout << "NO\n";
      continue;
    }
    int x = 0;
    bool pos = true;
    for (auto i = 0; i < to / n; i++) {
      x = n;
      sort(cnt.begin(), cnt.end(), greater<int>());
      for (auto j = 0; j < 30; j++)
        if (cnt[j] >= x) {
          cnt[j] -= x;
          x = -1;
          break;
        }
      if (x != -1) pos = false;
    }
    if (pos)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
}
