#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
long long modPower(long long x, long long y, long long m) {
  if (x == 0) return 0;
  long long res = 1;
  x = x % m;
  while (y) {
    if (y % 2) res = (res * x) % m;
    x = (x * x) % m;
    y /= 2;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
bool prime(long long n) {
  long long k = 1;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) k = i;
  }
  return k == 1;
}
long long solve(long long n, long long r) {
  long long c[n + 1][n + 1];
  for (long long i = 0; i < n + 1; i++)
    for (long long j = 0; j < n + 1; j++) c[i][j] = 0;
  for (long long i = 0; i <= n; i++) c[i][i] = 1;
  for (long long i = 0; i <= n; i++) c[i][0] = 1;
  for (long long i = 0; i <= n; i++) {
    for (long long j = 1; j < i; j++)
      c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) / mod;
  }
  return c[n][r];
}
long long cal(long long n, long long k) {
  unordered_set<long long> s;
  queue<pair<long long, long long>> q;
  q.push({n, 0});
  s.insert(n);
  while (!q.empty()) {
    auto i = q.front();
    q.pop();
    if (i.first == 0) return i.second;
    if (i.first % k == 0 && s.find(i.first / k) == s.end()) {
      q.push({i.first / k, i.second + 1});
    }
    if (s.find(i.first - 1) == s.end()) q.push({i.first - 1, i.second + 1});
  }
  return -1;
}
signed main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long fre[26] = {0};
    long long p = 0;
    for (long long i = 0; i < n; i++) {
      string s;
      cin >> s;
      for (long long j = 0; j < s.size(); j++) {
        fre[s[j] - 'a']++;
      }
      p++;
    }
    bool foo = true;
    for (long long i = 0; i < 26; i++) {
      if (fre[i] == 0 || fre[i] % p == 0)
        continue;
      else {
        foo = false;
        break;
      }
    }
    if (foo)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
