#include <bits/stdc++.h>
using namespace std;
long long int recpow(long long int x, long long int n, long long int mod) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return recpow((x * x) % mod, n / 2, mod);
  else
    return (x * recpow((x * x) % mod, (n - 1) / 2, mod)) % mod;
}
int32_t main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[26] = {0};
    for (long long int i = 0; i < n; i++) {
      string s;
      cin >> s;
      for (auto it : s) a[it - 'a']++;
    }
    long long int flg = 1;
    for (long long int i = 0; i < 26; i++)
      if (a[i] % n != 0) flg = 0;
    if (flg)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
