#include<bits/stdc++.h>
#define endl "\n"
using namespace std ;
int main() {
    ios::sync_with_stdio(NULL) ;
    cin.tie(NULL) ;
    cout.tie(NULL) ;
    int t ;
    cin >> t ;
    while( t-- ) {
        int n ;
        cin >> n ;
        string s ;
        int fr[30] = {0} ;
        for( int i = 0 ; i < n ; i++ ) {
            cin >> s ;
            for( int j = 0 ; j < s.size() ; j++ ) {
                fr[ s[j] - 'a' ]++ ;
            }
        }
        bool flag = 1 ;

        for( int i = 0 ; i < 30 ; i++ ) {
            if( fr[i] % n != 0 )
                flag = 0 ;
        }

        if( flag == 1 )
            cout << "YES" << endl ;
        else
            cout << "NO" << endl ;
    }
    return 0 ;
}
