#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int ar[n];
    for (int i = 0; i < n; ++i) cin >> ar[i];
    vector<string> p;
    string s;
    if (ar[0] != 0) {
      for (int i = 0; i < ar[0]; ++i) s.push_back('a');
      p.push_back(s);
      p.push_back(s);
    } else {
      s.push_back('a');
      p.push_back(s);
      string x;
      x.push_back('b');
      p.push_back(x);
    }
    for (int i = 1; i < n; ++i) {
      char c = p.back().back();
      if (ar[i] == 0) {
        char c1 = p.back()[0];
        c1 = (char)(97 + ((int)c1 + 1) % 26);
        string x;
        x.push_back(c1);
        p.push_back(x);
        continue;
      }
      if (ar[i] > p.back().length()) {
        string x = p.back();
        string y = p[p.size() - 2];
        if (y.length() <= x.length()) {
          p.pop_back();
          for (int j = x.length(); j < ar[i]; ++j) x.push_back('a');
          p.push_back(x);
          p.push_back(x);
        } else {
          p.pop_back();
          int z = x.length();
          for (int j = x.length(); j < ar[i]; ++j) {
            if (z >= y.length())
              x.push_back('a');
            else {
              x.push_back((char)(97 + ((int)y[z] + 1) % 26));
              ++z;
            }
          }
          p.push_back(x);
          p.push_back(x);
        }
      } else {
        string x = p.back();
        string y;
        for (int j = 0; j < ar[i]; ++j) y.push_back(x[j]);
        p.push_back(y);
      }
    }
    for (int i = 0; i < p.size(); ++i) cout << p[i] << '\n';
  }
}
