#include <bits/stdc++.h>
using namespace std;
const bool ready = []() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(12);
  return true;
}();
const double PI = acos(-1);
using ll = long long;
using pii = pair<ll, ll>;
using pdd = pair<double, double>;
using vd = vector<double>;
using vb = vector<bool>;
using vi = vector<ll>;
using vvi = vector<vi>;
using vs = vector<string>;
void solve() {
  ll n;
  cin >> n;
  ;
  vi cnt(26);
  for (ll i = 0; i < n; i++) {
    string s;
    cin >> s;
    ;
    for (size_t j = 0; j < s.size(); j++) cnt[s[j] - 'a']++;
  }
  bool ok = true;
  for (ll i = 0; i < 26; i++)
    if (cnt[i] % n != 0) ok = false;
  if (ok)
    cout << "YES"
         << "\n";
  else
    cout << "NO"
         << "\n";
}
signed main() {
  ll t;
  cin >> t;
  ;
  while (t--) solve();
}
