#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  for (int o = 0; o < t; o++) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    int c = 0;
    vector<string> vs(n + 1);
    if (a[0] == 0) {
      vs[0].push_back(c + 'a');
      c++, vs[1].push_back(c + 'a');
    } else {
      vs[0].append(a[0], c + 'a');
      vs[1] = vs[0];
    }
    for (int i = 1; i < n; i++) {
      if (a[i] == 0)
        c = (c + 1) % 26, vs[i + 1].push_back(c + 'a');
      else if (a[i] >= a[i - 1]) {
        if (a[i - 1] != 0)
          vs[i].append(a[i] - a[i - 1], c + 'a');
        else
          vs[i].append(a[i] - 1, c + 'a');
        vs[i + 1] = vs[i];
      } else
        vs[i + 1] = vs[i].substr(0, a[i]), c = (c + 1) % 26;
    }
    for (int i = 0; i < n + 1; i++) cout << vs[i] << "\n";
  }
}
