#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    string s[n + 1];
    long long int arr[n + 1];
    s[0] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
    for (int i = 1; i <= n; i++) cin >> arr[i];
    char ch, ch1;
    for (int i = 1; i <= n; i++) {
      long long int w = 0;
      ch = s[i - 1][0];
      for (int j = 0; j < arr[i]; j++) s[i] += s[i - 1][j];
      ch = s[i][max(w, arr[i] - 1)];
      for (int j = arr[i]; j <= 52; j++) {
        ch = s[i - 1][j];
        if (ch == 'z')
          ch = 'a';
        else
          ch++;
        s[i] += ch;
      }
    }
    for (int i = 0; i <= n; i++) cout << s[i] << endl;
  }
}
