#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, m = 0;
    cin >> n;
    vector<long long int> a(26, 0);
    string s;
    for (int i = 0; i < n; i++) {
      cin >> s;
      m += s.length();
      for (auto it : s) {
        a[it - 'a']++;
      }
    }
    bool flag = true;
    for (int i = 0; i < 26; i++) {
      if (a[i] % n != 0) {
        flag = false;
      }
    }
    flag ? cout << "YES\n" : cout << "NO\n";
  }
  return 0;
}
