#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[26];
    memset(a, 0, sizeof(a));
    for (int i = 0; i < n; i++) {
      string s;
      cin >> s;
      for (auto it : s) {
        a[it - 'a']++;
      }
    }
    int f = 0;
    for (int i = 0; i < 26; i++) {
      if (a[i] % n != 0) {
        cout << "NO"
             << "\n";
        f = 1;
        break;
      }
    }
    if (f == 0) {
      cout << "YES"
           << "\n";
    }
  }
  return 0;
}
