#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    string second;
    int *freq = new int[26];
    for (int i = 0; i < 26; i++) {
      freq[i] = 0;
    }
    for (int i = 0; i < n; i++) {
      cin >> second;
      for (char c : second) {
        freq[c - 'a']++;
      }
    }
    bool poss = true;
    for (int i = 0; i < 26; i++) {
      if ((freq[i] % n) != 0) {
        poss = false;
        break;
      }
    }
    if (poss) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
