#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    string s;
    vector<int> cnt(26);
    for (int ii = 0; ii < n; ++ii) {
      cin >> s;
      int l = s.length();
      for (int i = 0; i < l; ++i) {
        cnt[s[i] - 'a']++;
      }
    }
    bool succ = true;
    for (int i = 0; i < 26; ++i) {
      if (cnt[i] % n) {
        cout << "NO" << endl;
        succ = false;
        break;
      }
    }
    if (succ) {
      cout << "YES" << endl;
    }
  }
  return 0;
}
