#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    string s;
    int max = 0;
    cin >> n;
    int* arr = new int[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      if (arr[i] > max) max = arr[i];
    }
    if (max != 0) {
      for (int i = 0; i < max; i++) {
        s += 'a';
      }
      cout << s << endl;
      for (int i = 0; i < n; i++) {
        if (s[arr[i]] != 'z')
          s[arr[i]] = s[arr[i]] + 1;
        else
          s[arr[i]] = 'a';
        cout << s << endl;
      }
    } else {
      string s;
      for (int i = 0; i < n + 1; i++) {
        s = 'a' + (i % 25);
        cout << s << endl;
      }
    }
  }
  return 0;
}
