#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    vector<long long int> a(n);
    for (long long int i = 0; i < n; i++) cin >> a[i];
    string s = "";
    for (long long int i = 0; i < 50; i++) {
      s += 'a' + (i % 26);
    }
    cout << s << endl;
    string prev = s;
    for (long long int i = 0; i < n; i++) {
      string s1 = "";
      for (long long int j = 0; j < a[i]; j++) {
        s1 += prev[j];
      }
      for (long long int j = a[i]; j < 50; j++) {
        s1 += 'a' + (prev[j] + 1) % 26;
      }
      cout << s1 << endl;
      prev = s1;
    }
  }
}
