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