#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> itRS) {}
template <typename T, typename... Args>
void err(istream_iterator<string> itRS, T a, Args... args) {
  cerr << *itRS << " = " << a << "\n";
  err(++itRS, args...);
}
int dx[8] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dy[8] = {-1, 0, 1, -1, 1, -1, 0, 1};
const int MOD = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    string s;
    for (int i = 0; i < 50; i++) {
      s.push_back('a');
    }
    cout << s << "\n";
    for (int i = 0; i < n; i++) {
      string fi = "";
      for (int j = 0; j < a[i]; j++) {
        cout << s[j];
        fi.push_back(s[j]);
      }
      int value = (s[a[i]] - 97 + 1) % 26;
      for (int j = a[i]; j < 50; j++) {
        cout << (char)(value + 97);
        fi.push_back((char)(value + 97));
      }
      cout << "\n";
      s = fi;
    }
  }
  return 0;
}
