#include <bits/stdc++.h>
using namespace std;
int t;
int main() {
  cin >> t;
  while (t--) {
    int freq[100] = {0}, n;
    string s;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> s;
      for (int j = 0; j < s.length(); j++) {
        freq[s[j] - 'a']++;
      }
    }
    int found = true;
    for (int i = 0; i < 30; i++) {
      if (freq[i] % n != 0) {
        found = false;
        break;
      }
    }
    if (found) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
