#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, maximum = -1;
  cin >> n;
  vector<int> prefixes(n);
  for (int& i : prefixes) {
    cin >> i;
    maximum = max(maximum, i);
  }
  string oldString, newString;
  for (int i = 0; i <= maximum; i++) oldString += 'a';
  cout << oldString << '\n';
  for (int pref : prefixes) {
    for (int i = 0; i < pref; i++) {
      newString += oldString[i];
    }
    for (int i = pref; i <= maximum; i++) {
      newString += oldString[i] == 'z' ? 'a' : oldString[i] + 1;
    }
    cout << newString << '\n';
    oldString = newString;
    newString = "";
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
