#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long modInverse(long long n, long long p) { return power(n, p - 2, p); }
long long nCrModPFermat(long long n, long long r, long long p) {
  if (r == 0) return 1;
  long long fac[n + 1];
  fac[0] = 1;
  for (long long i = 1; i <= n; i++) fac[i] = fac[i - 1] * i % p;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s[26];
  s[0] = "a";
  for (long long i = 1; i < 26; i++) {
    s[i] = s[i - 1] + (char)(i + 'a');
  }
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
    }
    string ans[n + 1];
    long long k = 0;
    for (long long i = 0; i < n; i++) {
      if (a[i] == 0) {
        if (ans[i].size() == 0) ans[i] += ('a' + k++);
        k %= 26;
        ans[i + 1] += ('a' + k++);
      } else if (a[i] >= ans[i].size()) {
        a[i] -= ans[i].size();
        while (a[i]--) {
          ans[i] += ('a' + k);
        }
        k++;
        k = k % 26;
        ans[i + 1] = ans[i];
      } else {
        for (long long j = 0; j < a[i]; j++) {
          ans[i + 1] += ans[i][j];
        }
      }
      k %= 26;
    }
    for (long long i = 0; i <= n; i++) {
      cout << ans[i] << endl;
    }
  }
}
