#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << "\n";
  err(++it, args...);
}
ll modlaber(ll a, ll m = 1000000007) { return ((a + m) % m + m) % m; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int __;
  cin >> __;
  string pff = "bcd";
  while (__--) {
    int n;
    cin >> n;
    vector<string> ans(n + 1);
    for (ll i = (0); i < (n); i++) {
      int j;
      cin >> j;
      for (ll k = (0); k < (j); k++) {
        if (ans[i].length() <= k)
          ans[i] += 'a', ans[i + 1] += 'a';
        else
          ans[i + 1] += ans[i][k];
      }
      if (ans[i].length() == 0) ans[i] += 'x';
      ans[i + 1] +=
          (ans[i].length() <= j || ans[i].length() > j && ans[i][j] == 'x'
               ? 'y'
               : 'x');
    }
    for (auto x : ans) cout << x << "\n";
  }
  return 0;
}
