#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int tetra;
  cin >> tetra;
  while (tetra--) {
    long long int n;
    cin >> n;
    long long int a[26] = {0};
    for (long long int i = 0; i < n; i++) {
      string s;
      cin >> s;
      for (long long int j = 0; j < s.length(); j++) {
        a[s[j] - 'a'] += 1;
      }
    }
    bool f = true;
    for (long long int i = 0; i < 26; i++) {
      if (a[i] % n != 0) f = false;
    }
    if (f)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
