#include <bits/stdc++.h>
const int N = 1e5 + 5;
const long double pi = 3.141592653;
const long long MOD = 1e9 + 7;
const long long mod = 998244353;
const long long INF = 9223372036854775807LL;
using namespace std;
int dx[9] = {1, -1, 0, 0, 1, 1, -1, -1, 0};
int dy[9] = {0, 0, 1, -1, 1, -1, 1, -1, 0};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T = 1;
  cin >> T;
  while (T--) {
    int n, i, j;
    cin >> n;
    vector<int> g(26, 0);
    for (i = 0; i < n; i++) {
      string s;
      cin >> s;
      for (j = 0; j < (long long)s.size(); j++) g[s[j] - 'a']++;
    }
    bool ok = true;
    for (i = 0; i < 26; i++) {
      if (g[i] % n != 0) ok = false;
    }
    if (ok)
      cout << "YES";
    else
      cout << "NO";
    cout << "\n";
  }
  return 0;
}
