#include <bits/stdc++.h>
using namespace std;
string printRandomString(int n) {
  char alphabet[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                       'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                       's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
  string res = "";
  for (int i = 0; i < n; i++) res = res + alphabet[rand() % 26];
  if (n >= 0)
    return res;
  else
    return 0;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    int s = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      s = max(a[i], s);
    }
    s = s + 2;
    string p = printRandomString(s);
    cout << p << "\n";
    for (int i = 0; i < n; i++) {
      string q(p, 0, a[i]);
      int f = int(p[a[i]]) + 1;
      if (f > 122) f = f - 2;
      char r = char(f);
      q = q + r + printRandomString(s - a[i] - 1);
      p = q;
      cout << p << "\n";
    }
  }
  return 0;
}
