#include <bits/stdc++.h>
using namespace std;
const int N = 505;
long long MOD = 1e9 + 7;
long long INF = -1e9;
void solve() {
  int n;
  cin >> n;
  string s;
  vector<long long> cnt(26);
  for (int i = 0; i < (n); i++) {
    cin >> s;
    for (auto& c : s) {
      int id = (int)(c - 'a');
      cnt[id]++;
    }
  }
  for (auto& cur : cnt) {
    if (cur % n != 0) {
      cout << "NO" << endl;
      ;
      return;
    }
  }
  cout << "YES" << endl;
  ;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
