#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> dp(26, 0);
    string s;
    for (int i = 0; i < n; i++) {
      cin >> s;
      for (char c : s) {
        dp[c - 'a']++;
      }
    }
    bool ok = true;
    for (int i : dp) {
      if (i % n != 0) {
        ok = false;
        break;
      }
    }
    if (ok)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
  return 0;
}
