#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    string s;
    int a[26];
    for (int i = 0; i < 26; i++) a[i] = 0;
    cin >> n;
    int jhamela = n;
    while (n--) {
      cin >> s;
      for (int i = 0; i < s.size(); i++) {
        a[(int)s[i] - 97]++;
      }
    }
    int chk = 0;
    for (int i = 0; i < 26; i++) {
      chk += a[i] % jhamela;
    }
    if (chk == 0) {
      cout << "YES";
    } else {
      cout << "NO";
    }
    cout << endl;
  }
  return 0;
}
