#include <bits/stdc++.h>
using namespace std;
int a[1005];
string ans[1005];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    a[0] = a[n + 1] = 0;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    for (int i = 1; i <= n + 1; i++) {
      ans[i].clear();
      int mx = max(a[i], a[i - 1]);
      if (mx == 0) {
        if (ans[i - 1].length() == 0)
          ans[i] += 'a';
        else if (ans[i - 1][0] == 'z')
          ans[i] += 'a';
        else
          ans[i] += ans[i - 1][0] + 1;
        continue;
      }
      int len = ans[i - 1].length();
      for (int j = 1; j <= mx; j++) {
        if (j > len)
          ans[i] += 'a';
        else if (j <= a[i - 1])
          ans[i] += ans[i - 1][j - 1];
        else {
          if (ans[i - 1][j - 1] == 'z')
            ans[i] += 'a';
          else
            ans[i] += ans[i - 1][j - 1] + 1;
        }
      }
    }
    for (int i = 1; i <= n + 1; i++) cout << ans[i] << '\n';
  }
}
