#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, i, j, y;
    cin >> n;
    vector<long long int> a(n);
    for (i = 0; i < n; i++) cin >> a[i];
    vector<string> second(n + 1);
    char b = 'a';
    if (a[0] == 0) {
      second[0] = b;
      b++;
      if (b > 122) b = 97;
    } else {
      y = a[0];
      while (y--) {
        second[0].push_back(b);
      }
    }
    for (i = 1; i < n; i++) {
      for (j = 0; j < a[i - 1]; j++) {
        second[i].push_back(second[i - 1][j]);
      }
      y = a[i] - a[i - 1];
      b++;
      if (b > 122) b = 100;
      if (y < 0) y = 0;
      while (y--) {
        second[i].push_back(b);
      }
      if (second[i].size() == 0) {
        second[i].push_back(b);
        b++;
        if (b > 122) b = 100;
      }
    }
    for (j = 0; j < a[n - 1]; j++) {
      second[n].push_back(second[n - 1][j]);
    }
    if (second[n].size() == 0) second[n].push_back(b);
    for (i = 0; i < n + 1; i++) cout << second[i] << "\n";
  }
  return 0;
}
