#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    char c = 'a';
    vector<long long> a(n);
    for (long long i = 0; i < n; i++) cin >> a[i];
    ;
    vector<string> s(n + 1);
    for (size_t j = 0; j < a[0]; j++) s[0].push_back(c);
    if (a[0] == 0) {
      s[0] = "a";
    }
    for (long long i = 1; i <= n; i++) {
      if (a[i - 1] == 0) {
        if (s[i - 1][0] == 'a')
          s[i].push_back('b');
        else
          s[i].push_back('a');
        for (size_t j = 1; j < s[i - 1].length(); j++) {
          s[i].push_back(s[i - 1][j]);
        }
      }
      if (i == n) {
        for (size_t j = 0; j < a[i - 1]; j++) {
          s[i].push_back(s[i - 1][j]);
        }
      } else if (i & 1) {
        char c;
        for (size_t j = 0; j < a[i - 1]; j++) {
          s[i].push_back(s[i - 1][j]);
        }
        if (s[i - 1][a[i - 1]] == '\0')
          c = 'a';
        else
          c = s[i - 1][a[i - 1]];
        for (size_t j = 0; j < a[i]; j++)
          if (c != 'z')
            s[i].push_back(c + 1);
          else
            s[i].push_back('a');
      } else {
        char c;
        for (size_t j = 0; j < a[i - 1]; j++) {
          s[i].push_back(s[i - 1][j]);
        }
        if (s[i - 1][a[i - 1]] == '\0')
          c = 'a';
        else
          c = s[i - 1][a[i - 1]];
        for (size_t j = 0; j < a[i]; j++)
          if (c != 'z')
            s[i].push_back(c + 1);
          else
            s[i].push_back('a');
      }
    }
    for (long long i = 0; i <= n; i++) cout << s[i] << "\n";
  }
  return 0;
}
