#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, m, k = 0, p, q, ans = 0;
  cin >> n;
  string s;
  long long int f[26] = {0};
  for (int i = (0); i < (n); i++) {
    cin >> s;
    for (int j = (0); j < (s.size()); j++) {
      f[s[j] - 97]++;
    }
  }
  k = 1;
  for (int i = (0); i < (26); i++) {
    if (f[i] % n != 0) {
      k = 0;
      break;
    }
  }
  if (k)
    cout << "YES";
  else
    cout << "NO";
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
