#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) { return a > b; }
bool cmp_pair(pair<int, int> &a, pair<int, int> &b) {
  return a.second < b.second;
}
void solve() {
  int n;
  cin >> n;
  string s;
  int cnt[26];
  memset(cnt, 0, sizeof(cnt));
  int all = 0;
  for (int i = 0; i < n; i++) {
    cin >> s;
    for (int i = 0; i < s.size(); i++) cnt[s[i] - 'a']++;
    all += s.size();
  }
  if (all % n != 0)
    cout << "NO" << endl;
  else {
    for (int i = 0; i < 26; i++)
      if (cnt[i] % n != 0) {
        cout << "NO" << endl;
        return;
      }
    cout << "YES" << endl;
  }
}
void solve_2() {
  int t;
  cin >> t;
  while (t--) solve();
}
int main() {
  solve_2();
  return 0;
}
