The length of the longest common prefix of two strings $s = s_1 s_2 \ldots s_n$ and $t = t_1 t_2 \ldots t_m$ is defined as the maximum integer $k$ ($0 \le k \le min(n,m)$) such that $s_1 s_2 \ldots s_k$ equals $t_1 t_2 \ldots t_k$.

Koa the Koala initially has $n+1$ strings $s_1, s_2, \dots, s_{n+1}$.

For each $i$ ($1 \le i \le n$) she calculated $a_i$ — the length of the longest common prefix of $s_i$ and $s_{i+1}$.

Several days later Koa found these numbers, but she couldn't remember the strings.

So Koa would like to find some strings $s_1, s_2, \dots, s_{n+1}$ which would have generated numbers $a_1, a_2, \dots, a_n$. Can you help her?

If there are many answers print any. We can show that answer always exists for the given constraints. 


-----Input-----

Each test contains multiple test cases. The first line contains $t$ ($1 \le t \le 100$) — the number of test cases. Description of the test cases follows.

The first line of each test case contains a single integer $n$ ($1 \le n \le 100$) — the number of elements in the list $a$.

The second line of each test case contains $n$ integers $a_1, a_2, \ldots, a_n$ ($0 \le a_i \le 50$) — the elements of $a$.

It is guaranteed that the sum of $n$ over all test cases does not exceed $100$.


-----Output-----

For each test case:

Output $n+1$ lines. In the $i$-th line print string $s_i$ ($1 \le |s_i| \le 200$), consisting of lowercase Latin letters. Length of the longest common prefix of strings $s_i$ and $s_{i+1}$ has to be equal to $a_i$.

If there are many answers print any. We can show that answer always exists for the given constraints.


-----Example-----
Input
4
4
1 2 4 2
2
5 3
3
1 3 1
3
0 0 0

Output
aeren
ari
arousal
around
ari
monogon
monogamy
monthly
kevinvu
kuroni
kurioni
korone
anton
loves
adhoc
problems


-----Note-----

In the $1$-st test case one of the possible answers is $s = [aeren, ari, arousal, around, ari]$.

Lengths of longest common prefixes are:  Between $\color{red}{a}eren$ and $\color{red}{a}ri$ $\rightarrow 1$  Between $\color{red}{ar}i$ and $\color{red}{ar}ousal$ $\rightarrow 2$  Between $\color{red}{arou}sal$ and $\color{red}{arou}nd$ $\rightarrow 4$  Between $\color{red}{ar}ound$ and $\color{red}{ar}i$ $\rightarrow 2$

Difficulty: EASY
Tags: Greedy algorithms

String algorithms

Constructive algorithms
Skill types: Greedy algorithms

Starter code:

Solutions:
for ii in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = 'a' * a[0]
	c = ord('a')
	if a[0] == 0:
		s = 'a'
	print(s)
	for jj in range(n - 1):
		if a[jj + 1] <= a[jj]:
			s = s[:a[jj]]
			if a[jj] == 0:
				c += 1
				if c == 122:
					c = 97
				s = chr(c)
			print(s)
		else:
			c += 1
			if c == 122:
				c = 97
			s = s[:a[jj]] + chr(c) * (a[jj + 1] - a[jj])
			print(s)
	if a[-1] == 0:
		if c == 122:
			c = 97
		print(chr(c + 1))
	else:
		print(s[:a[-1]])


number = int(input())
for i in range(number):
	input()
	elements = list((int(x) for x in input().split()))
	k = max(elements)
	if not k:
		k = 1
	current = 'a' * k
	print(current)
	for j in range(len(elements)):
		if elements[j] < k:
			if current[elements[j]] == 'a':
				current = current[:elements[j]] + 'b' * (k - elements[j])
			else:
				current = current[:elements[j]] + 'a' * (k - elements[j])
			print(current)
		else:
			print(current)


import random
t = int(input())
for i in range(t):
	n = input()
	a = list(map(int, input().split()))
	fist = ''
	for i in range(max(a) + 1):
		t = chr(random.randrange(97, 122))
		while t == i:
			t = random.randrange(97, 122)
		fist += t
	print(fist)
	for i in a:
		ans = fist[:i]
		for j in fist[i:]:
			t = chr(random.randrange(97, 122))
			while t == j:
				t = chr(random.randrange(97, 122))
			ans = ans + t
			fist = ans
		print(fist)


import os
import re
import sys
from io import BytesIO, IOBase
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def main():
	testcase = inp()
	for _ in range(testcase):
		n = inp()
		a = inlist()
		ans = []
		p = 0
		ans.append(chr(97 + p % 25))
		p += 1
		for i in range(n):
			lagbe = a[i]
			ase = len(ans[i])
			deficit = lagbe - ase
			if lagbe == 0:
				ans.append(chr(97 + p % 25))
				p += 1
			elif deficit > 0:
				curr = ans[i] + chr(97 + p % 25) * deficit
				p += 1
				ans[-1] = curr
				ans.append(curr)
			else:
				temp = ans[i]
				ans.append(temp[:lagbe])
		ans.append
		for r in ans:
			print(r)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


T = int(input())
letters = [chr(ord('a') + j) for j in range(26)]
for t in range(1, T + 1):
	N = int(input())
	A = [int(s) for s in input().split()]
	y = max(A) + 1
	ans = []
	str1 = ''
	for x in range(y):
		str1 += letters[x % 26]
	ans.append(str1)
	for n in range(N):
		z = A[n]
		new_str = str1[:z]
		if z < len(str1):
			ind = ord(str1[z]) - ord('a')
			new_ind = (ind + 1) % 26
			new_str += chr(new_ind + ord('a'))
			new_str += str1[z + 1:]
		ans.append(new_str)
		str1 = new_str
	for x in ans:
		print(x)


for tc in range(int(input())):
	n = int(input())
	T = input().split(' ')
	for i in range(n):
		T[i] = int(T[i])
	A = 'a' * 50
	B = 'b' * 50
	for i in range(n):
		print(A)
		(A, B) = (A[0:T[i]] + B[T[i]:50], B[0:T[i]] + A[T[i]:50])
	print(A)


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s)
	sys.stdout.write('\n')

def wi(n):
	sys.stdout.write(str(n))
	sys.stdout.write('\n')

def wia(a, sep=' '):
	sys.stdout.write(sep.join([str(x) for x in a]))
	sys.stdout.write('\n')

def solve(n, a):
	m = max(a) + 1
	s = 'a' * m
	ws(s)
	for i in range(n):
		t = [si for si in s]
		if t[a[i]] == 'a':
			t[a[i]] = 'b'
		else:
			t[a[i]] = 'a'
		s = ''.join(t)
		ws(s)

def main():
	for _ in range(ri()):
		n = ri()
		a = ria()
		solve(n, a)
main()


import sys
import os, io
input = sys.stdin.readline

def read_int():
	return map(int, input().split())

def read_list():
	return list(map(int, input().split()))

def print_list(l):
	print(' '.join(map(str, l)))
N = int(input())
for _ in range(N):
	n = int(input())
	a = read_list()
	s = 'a' * 50
	print(s)
	for i in a:
		s = s[:i] + ''.join(['a' if s[j] == 'b' else 'b' for j in range(i, 50)])
		print(s)


T = int(input())
next = {'a': 'b', 'b': 'c', 'c': 'd', 'd': 'e', 'e': 'f', 'f': 'g', 'g': 'h', 'h': 'i', 'i': 'j', 'j': 'k', 'k': 'l', 'l': 'm', 'm': 'n', 'n': 'o', 'o': 'p', 'p': 'q', 'q': 'r', 'r': 's', 's': 't', 't': 'u', 'u': 'v', 'v': 'w', 'w': 'x', 'x': 'y', 'y': 'z', 'z': 'a'}
for _ in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	ans = ['' for i in range(n + 1)]
	ans[0] = 'a' * 52
	for i in range(n):
		change = 'a' if ans[i][a[i]] == 'b' else 'b'
		ans[i + 1] = ans[i][:a[i]] + change + ans[i][a[i]:]
	for i in range(n + 1):
		print(ans[i])


import time, math as mt, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IO():
	return stdin.readline()

def IP():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def P(x):
	return stdout.write(str(x) + '\n')

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * 1000001
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(1000001):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count
mx = 10 ** 7
spf = [mx] * (mx + 1)

def SPF():
	spf[1] = 1
	for i in range(2, mx + 1):
		if spf[i] == mx:
			spf[i] = i
			for j in range(i * i, mx + 1, i):
				if i < spf[j]:
					spf[j] = i
	return

def readTree(n, e):
	adj = [set() for i in range(n + 1)]
	for i in range(e):
		(u1, u2) = IP()
		adj[u1].add(u2)
	return adj
mod = 10 ** 9 + 7

def solve():
	n = II()
	a = L()
	unlike = 99
	if a == [0] * n:
		curr = 97
		for i in range(n + 1):
			print(chr(curr))
			curr += 1
			if curr == 123:
				curr = 97
	else:
		mx = max(a)
		curr = 97
		s = ''
		for i in range(mx):
			s += chr(curr)
			curr += 1
			if curr == 123:
				curr = 97
		print(s)
		for ele in a:
			if ele == mx:
				print(s)
			else:
				new = s[:ele]
				x = ord(s[ele])
				if x == 122:
					x = 97
				else:
					x += 1
				new += chr(x)
				new += s[ele + 1:]
				s = new
				print(new)
	return
t = II()
for i in range(t):
	solve()


import sys
from collections import defaultdict as dd
from collections import deque
from functools import *
from fractions import Fraction as f
from copy import *
from bisect import *
from heapq import *
from math import *
from itertools import permutations

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')

def inc(d, c):
	d[c] = d[c] + 1 if c in d else 1

def li():
	return [int(xx) for xx in input().split()]

def fli():
	return [float(x) for x in input().split()]

def comp(a, b):
	if a > b:
		return 2
	return 2 if a == b else 0

def gi():
	return [xx for x in input().split()]

def fi():
	return int(input())

def pro(a):
	return reduce(lambda a, b: a * b, a)

def swap(a, i, j):
	(a[i], a[j]) = (a[j], a[i])

def si():
	return list(input().rstrip())

def mi():
	return map(int, input().split())

def gh():
	sys.stdout.flush()

def graph(n, m):
	for i in range(m):
		(x, y) = mi()
		a[x].append(y)
		a[y].append(x)

def bo(i):
	return ord(i) - ord('a')
t = fi()
while t > 0:
	t -= 1
	n = fi()
	a = li()
	s = []
	s.append('a' * a[0] + 'z')
	for i in range(n):
		p = ''
		for j in range(a[i]):
			p += s[-1][j]
		if i == n - 1:
			if len(p) == 0:
				p += 'u'
			s.append(p)
			break
		for j in range(len(p), max(a[i + 1], 1)):
			if j >= len(s[-1]):
				p += 'a'
			elif s[-1][j] == 'a':
				p += 'b'
			else:
				p += 'a'
		s.append(p)
	for i in s:
		print(i)


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	k = 0
	z = max(l) + n
	s1 = 'a' * z
	print(s1)
	for j in range(n):
		if l[j] == 0:
			s2 = chr(98 + k % 25) * z
		else:
			s2 = s1[:l[j]] + chr(98 + k % 25) * (z - l[j])
		print(s2)
		s1 = s2
		k += 1


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = []
	for i in range(n + 1):
		s.append(chr(ord('a') + i % 25) * (max(a) + 1))
	for i in range(1, n + 1):
		if a[i - 1] == 0:
			s[i] = list(s[i])
			s[i][0] = chr(ord('a') + (ord(s[i - 1][0]) % 25 + 1))
			s[i] = ''.join(s[i])
		else:
			s[i] = list(s[i])
			for j in range(a[i - 1]):
				s[i][j] = s[i - 1][j]
			s[i] = ''.join(s[i])
	for i in s:
		print(i)


def func():
	n = int(input())
	arr = [int(i) for i in input().split()]
	prevstr = 'a' * 200
	print(prevstr)
	for i in arr:
		newstr = ''
		newstr = prevstr[0:i]
		for j in range(i + 1, 201):
			if prevstr[i] == 'a':
				newstr += 'b'
			else:
				newstr += 'a'
		print(newstr)
		prevstr = newstr
t = int(input())
for i in range(t):
	func()


for T in range(int(input())):
	N = int(input())
	A = [int(s) for s in input().split()]
	string = 'a'
	prev = ''
	for _ in range(A[0]):
		string += 'a'
	print(string)
	for index in range(N - 1):
		a = A[index]
		prev = string
		string = prev[:a]
		if a == 0:
			if prev[0] == 'a':
				string += 'b'
			else:
				string += 'a'
			for j in range(A[index + 1] - a):
				string += 'b'
			print(string)
			continue
		if a < A[index + 1]:
			try:
				if prev[a] == 'b':
					string += 'c'
				else:
					string += 'b'
			except:
				string += 'b'
			for j in range(A[index + 1] - a - 1):
				string += 'b'
		print(string)
	if A[-1] == 0:
		if string[0] == 'a':
			print('b')
		else:
			print('a')
	else:
		print(string[:A[N - 1]])


t = int(input())
for prroldg in range(t):
	n = int(input())
	d = list(map(int, input().split()))
	answer = [0] * (n + 1)
	answer[0] = 'a' * 100
	for i in range(1, n + 1):
		answer[i] = answer[i - 1][:d[i - 1]]
		if answer[i - 1][d[i - 1]] == 'b':
			answer[i] += 'c' * (100 - len(answer[i]))
		else:
			answer[i] += 'b' * (100 - len(answer[i]))
	for i in range(n + 1):
		print(answer[i])


import sys
input = lambda : sys.stdin.readline().strip()
t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	mx = max(a)
	ans = ['a' * (mx + 1)] * (n + 1)
	for i in range(n):
		who = 'a' if ans[i][a[i]] == 'b' else 'b'
		ans[i + 1] = ans[i][:a[i]] + who + ans[i][a[i] + 1:]
	for i in range(n + 1):
		print(ans[i])


t = int(input())
for you in range(t):
	n = int(input())
	l = input().split()
	li = [int(i) for i in l]
	print('a' * 51)
	curr = 'a' * 51
	for i in range(n):
		print(curr[:li[i]], end='')
		s = curr[:li[i]]
		if curr[li[i]] == 'a':
			for i in range(51 - li[i]):
				print('z', end='')
				s += 'z'
		else:
			for i in range(51 - li[i]):
				print('a', end='')
				s += 'a'
		curr = s
		print()


import math
import sys

def solve():
	n = int(input())
	a = list(map(int, input().split()))
	b = ['a' * 100]
	for i in range(n):
		sn = b[-1]
		if sn[a[i]] == 'a':
			sn = sn[:a[i]] + 'b' + sn[a[i] + 1:]
		else:
			sn = sn[:a[i]] + 'a' + sn[a[i] + 1:]
		b.append(sn)
	for i in range(n + 1):
		print(b[i])
t = int(input())
for tt in range(t):
	solve()


T = int(input())
for t in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	k = max(a)
	res = ['a' * (k + 1)] * (n + 1)
	for (i, x) in enumerate(a):
		c = 'b' if res[i][x] == 'a' else 'a'
		res[i + 1] = res[i][:x] + c + res[i][x + 1:]
	print(*res, sep='\n')


for s in [*open(0)][2::2]:
	r = [[98] * 200]
	for x in map(int, s.split()):
		r += (r[-1][:],)
		r[-1][x] ^= 1
	for s in r:
		print(''.join(map(chr, s)))


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	mx = max(a)
	ans = ['a' * (mx + 1) for i in range(n + 1)]
	for i in range(n):
		s = 'a' if ans[i][a[i]] == 'b' else 'b'
		ans[i + 1] = ans[i][:a[i]] + s + ans[i][a[i] + 1:]
	for i in ans:
		print(i)


import sys
from collections import deque, defaultdict
I = sys.stdin.readline

def ii():
	return int(I().strip())

def li():
	return list(map(int, I().strip().split()))

def mi():
	return map(int, I().strip().split())

def main():
	for _ in range(ii()):
		z = 'bcdefghijklmnopqrstuvwxyz'
		n = ii()
		a = li()
		ans = ['a' * 50]
		last = ans[0]
		x = -1
		for i in range(n):
			x = (x + 1) % 25
			s = last[:a[i]] + z[x] + 'a' * (50 - len(last[:a[i]]) - 1)
			last = s
			ans.append(s)
		for i in ans:
			print(i)
main()


from collections import defaultdict
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	p = 'a' * 100
	print(p)
	for i in arr:
		s = ''
		s += p[:int(i)]
		if p[int(i)] == 'a':
			s += 'b'
		else:
			s += 'a'
		for j in range(int(i), 100):
			s += 'a'
		p = s
		print(p)


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	print('a' * 200)
	s = 'a' * 200
	for i in range(n):
		ans = s[:l[i]]
		if l[i] == 200:
			print(s)
			continue
		x = (ord(s[l[i]]) - 96) % 26
		x = chr(97 + x)
		ans = ans + (200 - len(ans)) * x
		print(ans)
		s = ans


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	m = max(a)
	if m == 0:
		m = 1
	s = 'a' * m
	x = []
	for i in range(n + 1):
		x.append(s)
	for i in range(n):
		r = x[i][:a[i]]
		k = x[i][a[i]:]
		if len(k) == 0:
			x[i + 1] = r
		elif k[0] == 'a':
			t = 'b' * len(k)
			x[i + 1] = r + t
		else:
			t = 'a' * len(k)
			x[i + 1] = r + t
	for i in x:
		print(i)


import sys

def helper(s):
	ans = ''
	for i in s:
		if i == 'a':
			ans += 'b'
		else:
			ans += 'a'
	return ans
for _ in range(int(input())):
	n = int(input())
	arr = [int(x) for x in input().split()]
	prev = 'a' * 52
	print(prev)
	for i in arr:
		now = prev[:i] + helper(prev[i:])
		print(now)
		prev = now


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
from collections import defaultdict
from itertools import permutations
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a.append(a[-1])
	c = 'a' * 150
	d = 'abcdefghijklmnopqrstuvwxyz'
	r = list()
	r.append(c)
	for i in range(n):
		d1 = a[i]
		res = r[-1][:d1]
		m = 150 - d1
		ch = 'a'
		for j in d:
			if j != r[-1][d1]:
				ch = j
				break
		res += ch * m
		r.append(res)
	for i in r:
		print(i)


import sys, math
input = lambda : sys.stdin.readline().rstrip()
alfa = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	c = max(1, max(a))
	print(c * 'a')
	last = c * 'a'
	for i in a:
		cur = 0
		new = ''
		while cur < i:
			new += last[cur]
			cur += 1
		while cur < c - -1 - 1:
			if last[cur] == 'a':
				new += 'b'
			else:
				new += 'a'
			cur += 1
		last = new
		print(last)


t = int(input())
alpha = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
lst3 = []
for i in range(t):
	lst2 = []
	n = int(input())
	lst = list([int(q) for q in input().split()])
	leng = max(1, max(lst))
	n1 = alpha[0:leng + 3]
	lst2.append(n1)
	for j in range(n):
		if alpha[0] == n1[lst[j]]:
			string = n1[0:lst[j]] + alpha[1:leng + 2 - lst[j] + 1]
		else:
			string = n1[0:lst[j]] + alpha[0:leng + 2 - lst[j]]
		lst2.append(string)
		n1 = string
	lst3.append(lst2)
for i in lst3:
	for j in i:
		print(j)


t = int(input())
for h in range(t):
	n = int(input())
	s = list()
	o = input().split()
	for j in range(n):
		s.append(int(o[j]))
	ans = list()
	for j in range(n + 1):
		ans.append('')
	for i in range(n):
		if s[i] == 0:
			if i == 0:
				ans[i] = 'a'
				ans[i + 1] = 'b'
			elif ans[i][0] == 'a':
				ans[i + 1] = 'b'
			else:
				ans[i + 1] = 'a'
		elif i == 0:
			ans[i] = 'a' * s[i]
			ans[i + 1] = 'a' * s[i]
		elif s[i] <= len(ans[i]):
			ans[i + 1] = ans[i][0:s[i]]
		else:
			ans[i + 1] = ans[i]
			if len(ans[i]) < len(ans[i - 1]):
				if ans[i - 1][len(ans[i])] == 'a':
					ans[i] = ans[i] + 'b'
					ans[i + 1] = ans[i + 1] + 'b'
				else:
					ans[i] = ans[i] + 'a'
					ans[i + 1] = ans[i + 1] + 'a'
				ans[i] = ans[i] + 'a' * abs(len(ans[i]) - s[i])
				ans[i + 1] = ans[i]
			else:
				ans[i] = ans[i] + 'a' * abs(len(ans[i]) - s[i])
				ans[i + 1] = ans[i]
	for i in ans:
		print(i)


from sys import stdin, stdout
import math
from collections import Counter, defaultdict
LI = lambda : list(map(int, input().split()))
MAP = lambda : map(int, input().split())
IN = lambda : int(input())
S = lambda : input()

def case():
	n = IN()
	a = LI()
	s = 'a' * 51
	print(s)
	for i in a:
		s = list(s)
		if s[i] == 'b':
			s[i] = 'a'
		else:
			s[i] = 'b'
		print(''.join(s))
for _ in range(IN()):
	case()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	c = {'a': 'b', 'b': 'a'}
	words = ['a' * 50] * (n + 1)
	for (i, v) in enumerate(a):
		new = words[i][:v + 1]
		new = new[:v] + c[new[-1]]
		words[i + 1] = new + words[i + 1][len(new):]
	for w in words:
		print(w)


t = int(input())
for _ in range(t):
	input()
	temp = input().split(' ')
	li = list(map(int, temp))
	so = ''
	asc = 97
	for x in range(max(li) + 1):
		so = so + chr(asc)
	print(so)
	for x in li:
		if so[x] == 'a':
			asc = 98
		else:
			asc = 97
		s = so[0:x]
		for y in range(max(li) + 1 - x):
			s = s + chr(asc)
		so = s
		print(s)


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import bisect as bi
import heapq

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_right(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		n = I()
		l = list(In())
		tem = 'bcdefghijklmnopqrstuvwxyz'
		s = ['a'] * 51
		ans = []
		ans.append(''.join(s))
		j = 0
		for x in range(n):
			temp = s
			for i in range(l[x]):
				temp[i] = ans[-1][i]
			temp[l[x]] = tem[j]
			j += 1
			if j >= 20:
				j = 0
			ans.append(''.join(temp))
		for x in ans:
			print(x)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	l = [0] * (n + 1)
	l[0] = 'a' * 50
	print(l[0])
	count = 0
	for i in range(1, n + 1):
		k = l[i - 1][:A[i - 1]] + chr(98 + count % 25) * (50 - A[i - 1])
		l[i] = k
		count += 1
		print(k)


s = 'abcdefghijklmnoprstuvwxyz' * 10
s = s[:200]
t = int(input())
while t:
	t -= 1
	n = int(input())
	a = [int(x) for x in input().split()]
	m = max(a) + 5
	ans = []
	ans.append(s[:m])
	c = 195
	for i in range(n):
		match = a[i]
		if match == 200:
			x = ans[-1]
			ans.append(x)
		else:
			x = ans[-1]
			if x[match] != s[c % 200]:
				st = x[:match] + s[c % 200] + x[match + 1:]
				ans.append(st)
			else:
				st = x[:match] + s[(c + 1) % 200] + x[match + 1:]
				ans.append(st)
		c += 1
	for i in ans:
		print(i)


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	li = list(map(int, input().split()))
	a = max(li)
	a = max(a, 1)
	s = ''
	for i in range(a):
		s += 'y'
	print(s)
	for i in li:
		if i == a:
			print(s)
			continue
		x = s[:i]
		x += chr((ord(s[i]) - 97 + 1) % 26 + 97)
		x += s[i + 1:]
		s = x
		print(s)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	l = []
	s = ['a'] * 51
	l.append(''.join(s))
	p = ['a'] * 51
	for i in range(n):
		s = ['a'] * 51
		for j in range(a[i]):
			s[j] = p[j]
		if chr(ord(p[a[i]])) == 'z':
			s[a[i]] = chr(ord(p[a[i]]) - 1)
		else:
			s[a[i]] = chr(ord(p[a[i]]) + 1)
		p = s
		k = ''.join(s)
		l.append(k)
	for i in l:
		print(i)


for _ in ' ' * int(input()):
	a = int(input())
	z = list(map(int, input().split()))
	x = ['a'] * 200
	print(''.join(x))
	for i in z:
		s = x[i]
		for j in range(97, 123):
			if s != chr(j):
				s = chr(j)
				break
		x[i] = s
		print(''.join(x))


from math import *
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	k = max(a)
	if k == 0:
		print('a')
		for i in range(n):
			if i % 2 == 0:
				print('b')
			else:
				print('a')
		continue
	s = ['a'] * k
	for i in range(k):
		print(s[i], end='')
	print()
	for i in range(n):
		for j in range(a[i]):
			print(s[j], end='')
		for j in range(k - a[i]):
			if s[j + a[i]] == 'a':
				print('b', end='')
				s[j + a[i]] = 'b'
			else:
				print('a', end='')
				s[j + a[i]] = 'a'
		print()


a = int(input())
for i in range(a):
	s = int(input())
	z = list(map(int, input().split()))
	print('a' * 100)
	ans = ['a' * 100]
	extra = 'a'
	for i in range(len(z)):
		m = ans[-1][0:z[i]]
		extra = ans[-1][z[i]]
		r = 100 - len(m)
		if extra == 'a':
			m = m + 'b' * r
			extra = 'b'
		else:
			m = m + 'a' * r
			extra = 'a'
		print(m)
		ans.append(m)


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()

def solve():
	n = int(inputi())
	aa = [int(a) for a in inputi().split()]
	ss = ['a' * 51]
	for i in range(0, n):
		ch = 'b' if ss[-1][aa[i]] == 'a' else 'a'
		ss.append(ss[-1][:aa[i]] + ch * (51 - aa[i]))
	for s in ss:
		print(s)

def main():
	t = int(inputi())
	for _ in range(t):
		solve()
main()


import sys
import math

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()
t = II()
for q in range(t):
	n = II()
	a = LI()
	s = []
	for i in range(n + 1):
		s.append(list('a' * 51))
	for i in range(1, n):
		s[i] = s[i - 1][:]
		o = ord(s[i][a[i - 1]]) + 1
		if o == 123:
			o -= 26
		s[i][a[i - 1]] = chr(o)
	s[-1] = s[-2][:]
	o = ord(s[-1][a[-1]]) + 1
	if o == 123:
		o -= 26
	s[-1][a[-1]] = chr(o)
	for i in s:
		print(''.join(i))


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop, heapify
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
M = mod = 998244353

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
for _ in range(val()):
	n = val()
	l = li()
	ans = ['a' * 100]
	for i in l:
		last = ans[-1]
		curr = ''
		for j in range(i):
			curr += last[j]
		toadd = 'b' if last[i] == 'a' else 'a'
		curr += toadd * (100 - len(curr))
		ans.append(curr[:])
	for i in ans:
		print(i)


t = int(input())
for testcase in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	tmp = 'a' * 51
	print(tmp)
	for i in ar:
		if tmp[i] == 'a':
			tmp = tmp[:i] + 'b' + tmp[i + 1:]
		else:
			tmp = tmp[:i] + 'a' + tmp[i + 1:]
		print(tmp)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	pre = list('a' * 51)
	print(''.join(pre))
	for i in arr:
		if pre[i] == 'b':
			pre[i] = 'a'
		else:
			pre[i] = 'b'
		print(''.join(pre))


t = int(input())
while t:
	n = int(input())
	a = [int(i) for i in input().split()]
	s = []
	s.append('a' * 200)
	for i in range(n):
		if s[-1][a[i]] == 'a':
			s.append(s[-1][:a[i]] + 'b' + s[-1][a[i] + 1:])
		else:
			s.append(s[-1][:a[i]] + 'a' + s[-1][a[i] + 1:])
	print(*s, sep='\n')
	t -= 1


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		prev = 'a' * 200
		p = 200
		print(prev)
		for (c, el) in enumerate(a):
			s = prev[:el]
			if el != 200:
				if prev[el] == 'z':
					s += 'b' * (200 - el)
				else:
					s += 'z' * (200 - el)
			print(s)
			prev = s
			p = el
main()


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	st = ['a'] * 100
	print(''.join(st))
	for i in ar:
		if st[i] == 'a':
			st[i] = 'b'
		else:
			st[i] = 'a'
		print(''.join(st))


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	num = 97
	liste = []
	stre1 = ''
	stre2 = ''
	mx = max(arr)
	ans = ['a' * (mx + 1)] * (n + 1)
	for j in range(1, n + 1):
		if j != n:
			if ans[j][arr[j - 1]] == 'a':
				ans[j] = list(ans[j])
				ans[j][arr[j - 1]] = 'b'
				ans[j] = ''.join(ans[j])
			elif ans[j][arr[j - 1]] == 'b':
				ans[j] = list(ans[j])
				ans[j][arr[j - 1]] = 'a'
				ans[j] = ''.join(ans[j])
			ans[j + 1] = ans[j]
		elif ans[j][arr[j - 1]] == 'a':
			ans[j] = list(ans[j])
			ans[j][arr[j - 1]] = 'b'
			ans[j] = ''.join(ans[j])
		elif ans[j][arr[j - 1]] == 'b':
			ans[j] = list(ans[j])
			ans[j][arr[j - 1]] = 'a'
			ans[j] = ''.join(ans[j])
	for j in range(n + 1):
		print(ans[j])


for _ in range(int(input())):
	n = int(input())
	a = [*map(int, input().split())]
	b = 'a' * 64
	print(b)
	for i in a:
		b = list(b)
		b[i] = 'a' if b[i] == 'b' else 'b'
		print(''.join(b))


def inp():
	inp = input().split()
	if len(inp) == 1:
		return int(inp[0])
	else:
		return (int(i) for i in inp)

def inplist():
	inp = input().split()
	for i in range(len(inp)):
		inp[i] = int(inp[i])
	return inp

def flip(l, n):
	if l[n] == 'a':
		l[n] = 'b'
	else:
		l[n] = 'a'
	return l
testcases = inp()
for testcase in range(testcases):
	n = inp()
	s = inplist()
	l = ['a' for i in range(200)]
	print(''.join(l))
	for i in s:
		l = flip(l, i)
		print(''.join(l))


t = int(input())
for i in range(t):
	n = int(input())
	ls = list(map(int, input().split()))
	ans = [0] * (n + 1)
	pmoji = 'a' * ls[0]
	ans[0] = pmoji
	pmojisu = ls[0]
	if pmojisu == 0:
		pmoji = 'a'
		pmojisu = 1
		ans[0] = pmoji
	mojisu = 0
	for j in range(n):
		stbuild = []
		if j + 1 < n:
			mojisu = max(ls[j], ls[j + 1])
		else:
			mojisu = ls[j]
		if mojisu == 0:
			mojisu = 1
		if pmojisu == ls[j]:
			stbuild.append(pmoji)
			if mojisu > pmojisu:
				stbuild.append('a' * (mojisu - pmojisu))
		elif pmojisu > ls[j]:
			stbuild.append(pmoji[0:ls[j]])
			if mojisu > ls[j]:
				if ls[j] == 0:
					if pmoji[0] == 'a':
						stbuild.append('b')
						if mojisu > 1:
							stbuild.append('a' * (mojisu - 1))
					else:
						stbuild.append('a' * mojisu)
				elif pmoji[ls[j]] == 'a':
					stbuild.append('b')
					stbuild.append('a' * (mojisu - ls[j] - 1))
				else:
					stbuild.append('a' * (mojisu - ls[j]))
		pmoji = ''.join(stbuild)
		pmojisu = mojisu
		ans[j + 1] = pmoji
	for j in ans:
		print(j)


import math
from collections import deque
from sys import stdin, stdout
from string import ascii_letters
input = stdin.readline
letters = ascii_letters[:26]
for _ in range(int(input())):
	n = int(input())
	ind = 0
	arr = list(map(int, input().split()))
	mx = max(arr) + 1
	print(letters[ind] * mx)
	last = list(letters[ind] * mx)
	ind = (ind + 1) % 26
	for i in range(n):
		last[arr[i]] = letters[(letters.index(last[arr[i]]) + 1) % 26]
		print(''.join(last))


for z in range(int(input())):
	n = int(input())
	arr = [int(i) for i in input().split()]
	start = ''
	for i in range(200):
		start += 'a'
	print(start)
	for i in arr:
		temp = ''
		for j in range(i):
			temp += start[j]
		for j in range(i, 200):
			if start[j] == 'a':
				temp += 'b'
			else:
				temp += 'a'
		print(temp)
		start = temp


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	m = max(l)
	out = ['a' * (m + 1)] * (n + 1)
	for i in range(n):
		x = l[i]
		if out[i][x] == 'a':
			t = 'b'
		else:
			t = 'a'
		out[i + 1] = out[i][:x] + t + out[i][x + 1:]
	print('\n'.join(out))


for _ in range(int(input())):
	n = int(input())
	s = ['a' * 200 for i in range(n + 1)]
	list1 = list(map(int, input().split()))
	for i in range(n):
		s[i + 1] = s[i][:list1[i]]
		if s[i][list1[i]] == 'y':
			s[i + 1] += 'x' * (200 - list1[i])
		else:
			s[i + 1] += 'y' * (200 - list1[i])
	for i in range(n + 1):
		print(s[i])


from math import ceil
from sys import stdin, stdout, setrecursionlimit
for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	ok = ['b', 'c', 'd']
	cur = 0
	ans = []
	for i in range(n + 1):
		ans.append('')
	ans[0] = 'a' * 200
	for i in range(n):
		for j in range(3):
			if ok[j] != ans[i][a[i]]:
				cur = j
				break
		ans[i + 1] = ans[i][:a[i]] + ok[cur] * (200 - a[i])
		cur += 1
	for i in range(n + 1):
		print(ans[i])


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from collections import Counter
import heapq
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	var = 97
	if arr[0] == 0:
		pre = ''
		print(chr(var))
		var += 1
	else:
		pre = chr(var) * arr[0]
		print(pre)
	for i in range(1, n):
		if arr[i] == 0:
			if pre != '':
				print(pre)
				var += 1
				pre = ''
			else:
				if var > 122:
					var = 97
				print(chr(var))
				var += 1
				pre = ''
		elif arr[i] > len(pre):
			if var > 122:
				var = 97
			ans = pre + chr(var) * (arr[i] - len(pre))
			print(ans)
			pre = ans
		else:
			print(pre)
			pre = pre[:arr[i]]
			var += 1
	if pre != '':
		print(pre)
	else:
		if var > 122:
			var = 97
		print(chr(var))


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	q = max(l)
	pre = 'a' * q
	d = {'a': 'b', 'b': 'a'}
	if q == 0:
		x = 'a'
		print('b')
		for i in range(len(l)):
			print(x)
			x = d[x]
		continue
	d = {'a': 'b', 'b': 'a'}
	print(pre)
	for i in range(len(l)):
		s = ''
		s = pre[:l[i]]
		if len(s) < q:
			s += d[pre[len(s)]] * (q - len(s))
		print(s)
		pre = s


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	word_length = max(a) + 1
	sedrick = ['a' * word_length] * (n + 1)
	print(sedrick[0])
	for (i, x) in enumerate(a):
		got = 'a' if sedrick[i][x] == 'b' else 'b'
		sedrick[i + 1] = sedrick[i][:x] + got + sedrick[i][x + 1:]
		print(sedrick[i + 1])


t = int(input())
for i in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	ar.append(0)
	l = []
	s = ''
	y = 96
	if ar[0] == 0:
		s = 'a'
	for i in range(ar[0]):
		y = y + 1
		if y > 122:
			y = 97
		s += chr(y)
	l.append(s)
	mx = 0
	for i in range(n):
		s = ''
		mx = max(mx, ar[i], ar[i + 1])
		if ar[i] == 0 and ar[i + 1] == 0:
			y = ord(l[-1][-1]) + 1
			if y > 122:
				y = 97
			l.append(chr(y))
		else:
			s = l[-1][:ar[i]]
			z = ord(l[-1][-1])
			for j in range(mx - ar[i]):
				z = z + 1
				if z > 122:
					z = 97
				s += chr(z)
			l.append(s)
	for i in l:
		print(i)


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = 'a' * 200
	print(s)
	for i in range(n):
		s = s[0:l[i]] + chr((ord(s[l[i]]) + 1 - 97) % 26 + 97) * (200 - l[i])
		print(s)


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(s) for s in input().split(' ')]
	output = []
	maxim = max(a)
	if maxim == 0:
		output.append('aaaa')
		for i in a:
			if output[-1][0] == 'z':
				el = 'a'
			else:
				el = chr(ord(output[-1][0]) + 1)
			output.append(el * 4)
	else:
		output.append('a' * maxim)
		for i in a:
			if i == maxim:
				output.append(output[-1])
			else:
				if output[-1][i] == 'z':
					el = 'a'
				else:
					el = chr(ord(output[-1][i]) + 1)
				if i == 0:
					output.append(el + output[-1][i + 1:])
				else:
					output.append(output[-1][:i] + el + output[-1][i + 1:])
	for el in output:
		print(el)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = 'a' * 200
	s = list(s)
	print(''.join(s))
	for i in range(n):
		if s[a[i]] == 'a':
			s[a[i]] = 'b'
		else:
			s[a[i]] = 'a'
		print(''.join(s))


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = ['a'] * (max(l) + 1)
	print(''.join(s))
	for i in l:
		if s[i] == 'b':
			s[i] = 'a'
		else:
			s[i] = 'b'
		print(''.join(s))


import sys
import heapq

def main():
	alphabet = 'abcdefghijklmnopqrstuvwxyz'
	t = int(input())
	for _ in range(t):
		n = int(input())
		nums = list(map(int, sys.stdin.readline().split()))
		init = 'a' * 100
		print(init)
		for i in range(n):
			temp = init[:nums[i]]
			if init[nums[i]] == 'a':
				temp += 'b'
			else:
				temp += 'a'
			temp += 'a' * (110 - len(temp))
			print(temp)
			init = temp
	return
main()


def frt(a):
	if a == 'z':
		return 'a'
	else:
		gg = chr(ord(a) + 1)
		return gg
for _ in range(int(input())):
	t = int(input())
	dtf = list(map(int, input().split()))
	ans = 'a' * (max(dtf) + 1)
	print(ans)
	for j in range(0, t):
		ans = list(ans)
		ans[dtf[j]] = frt(ans[dtf[j]])
		ans = ''.join(ans)
		print(str(ans))


import string

def solve():
	n = int(input())
	s = input().split()
	m = 0
	for i in range(len(s)):
		s[i] = int(s[i])
		m = max(m, s[i])
	print('a' * (m + 1))
	cur = ['a'] * (m + 1)
	for i in range(len(s)):
		if cur[s[i]] == 'a':
			cur[s[i]] = 'b'
		else:
			cur[s[i]] = 'a'
		print(''.join(cur))
t = int(input())
for i in range(t):
	solve()


def swap(a):
	global t
	if t[a] == 'a':
		t = t[:a] + 'b' + t[a + 1:]
	else:
		t = t[:a] + 'a' + t[a + 1:]
	return t
for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	t = 'a' * (max(l) + 2)
	print(t)
	for j in l:
		print(swap(j))


t = int(input())
for j in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	x = max(max(a), 1)
	ans = ['a' * x]
	for i in range(n):
		if a[i] == x:
			ans.append(ans[-1])
		elif a[i] == 0:
			if ans[-1][0] == 'a':
				ans.append('b' * x)
			else:
				ans.append('a' * x)
		else:
			s = ans[-1][:a[i]]
			if ans[-1][a[i]:][0] == 'a':
				s += 'b' * (x - a[i])
			else:
				s += 'a' * (x - a[i])
			ans.append(s)
	print(*ans, sep='\n')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = ['a'] * 200
	print(''.join(s))
	for i in range(n):
		value = ord(s[l[i]]) - 97 + 1
		c = chr(value % 26 + 97)
		s[l[i]] = c
		print(''.join(s))


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	if arr[0] == 0:
		lis = ['a', 'b']
		k = 2
	else:
		s = 'a' * arr[0]
		lis = [s, s]
		k = 1
	for j in range(1, n):
		if arr[j] == 0:
			lis.append(chr(k % 26 + 97))
			k += 1
		elif arr[j] > arr[j - 1]:
			if arr[j - 1] == 0:
				if j > 1:
					a = len(lis[j - 2])
					x = arr[j] - len(lis[-1])
					if a >= len(lis[-1]) + x:
						if lis[j - 2][arr[j - 1]] == chr(k % 26):
							k += 1
						lis[-1] += chr(k % 26 + 97) * x
						lis.append(lis[-1])
						k += 1
					else:
						lis[-1] += chr(k % 26 + 97) * x
						lis.append(lis[-1])
						k += 1
				else:
					x = arr[j] - len(lis[-1])
					lis[-1] += chr(k % 26 + 97) * x
					lis.append(lis[-1])
					k += 1
			elif j > 1:
				a = len(lis[j - 2])
				x = arr[j] - len(lis[-1])
				if a >= len(lis[-1]) + x:
					if lis[j - 2][arr[j - 1]] == chr(k % 26 + 97):
						k += 1
					lis[-1] += chr(k % 26 + 97) * x
					lis.append(lis[-1])
					k += 1
				else:
					lis[-1] += chr(k % 26 + 97) * x
					lis.append(lis[-1])
					k += 1
			else:
				x = arr[j] - len(lis[-1])
				lis[-1] += chr(k % 26 + 97) * x
				lis.append(lis[-1])
				k += 1
		elif arr[j] == arr[j - 1]:
			lis.append(lis[-1])
		else:
			lis.append(lis[-1][:arr[j]])
	for j in range(n + 1):
		print(lis[j])


import string
import random
for i in range(int(input())):
	n = int(input())
	x = list(map(int, input().split()))
	c = max(x)
	y = ['a'] * 100
	print(*y, sep='')
	for i in x:
		if i == 0:
			if y[i] == 'a':
				y[i] = 'b'
			elif y[i] == 'b':
				y[i] = 'a'
			print(*y, sep='')
			continue
		if y[i] == 'a':
			y[i] = 'b'
		elif y[i] == 'b':
			y[i] = 'a'
		print(*y, sep='')


for _ in range(int(input())):
	n = int(input())
	s = list(map(int, input().split()))
	temp = 'a' * 200
	print(temp)
	for i in range(n):
		if temp[s[i]] == 'a':
			c = 'b'
		if temp[s[i]] == 'b':
			c = 'a'
		temp = temp[:s[i]] + c + temp[s[i] + 1:]
		print(temp)


import io
import os
from collections import deque, defaultdict
if 'STDINPUT' not in os.environ:
	global input
else:
	print('Standard input')
testcases = True

def solve():
	n = int(input())
	a = [int(x) for x in input().split()]
	s = 'a' * max(max(a), 1)
	print(s)
	for i in a:
		g = ''
		for x in range(0, i):
			g += s[x]
		for x in range(i, len(s)):
			g += chr((ord(s[x]) - ord('a') + 1) % 26 + ord('a'))
		print(g)
		s = g
if testcases:
	_q = int(input())
	for _ in range(_q):
		solve()
else:
	solve()


for _ in range(int(input())):
	n = int(input())
	List = list(map(int, input().split()))
	ans = ['a' * 51]
	for s in List:
		if ans[-1][s] == 'a':
			curr = ans[-1][:s] + 'b' * (51 - s)
		else:
			curr = ans[-1][:s] + 'a' * (51 - s)
		ans.append(curr)
	print(*ans, sep='\n')


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	l = max(ar)
	ans = ['a' * (l + 1)]
	i = 0
	while i < n:
		t = list(ans[-1])
		if t[ar[i]] != 'z':
			t[ar[i]] = chr(ord(t[ar[i]]) + 1)
		else:
			t[ar[i]] = chr(ord(t[ar[i]]) - 1)
		ans.append(''.join(t))
		i += 1
	for i in ans:
		print(i)


T = int(input())

def printa(a):
	print(''.join(('a' if x == 0 else 'b' for x in a)))
for _ in range(T):
	N = int(input())
	a = [int(x) for x in input().split(' ')]
	s = [0 for _ in range(100)]
	printa(s)
	for x in a:
		s[x] = 1 - s[x]
		printa(s)


for t in range(int(input())):
	n = int(input())
	a = [int(s) for s in input().split()]
	previous_string = 'a' * (max(a) + 1)
	for i in range(n):
		print(previous_string)
		new_string = previous_string[:a[i]] + ('a' if previous_string[a[i]] != 'a' else 'b') + 'a' * (max(a) - a[i])
		previous_string = new_string
	print(new_string)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	s = ['a' * 52]
	tmp = {'a': 'b', 'b': 'a'}
	for i in range(n):
		p = s[-1][0:arr[i]] + tmp[s[-1][arr[i]]] * (52 - arr[i])
		s.append(p)
	for i in range(n + 1):
		print(s[i])


def main():
	lttr = 'abcdefghijklmopqrstuvwxyz' * 8
	for _ in range(int(input())):
		n = int(input())
		arr = list(map(int, input().split()))
		arr3 = [0] * n
		arr3[0] = (0, arr[0])
		ans = lttr[:max(arr[0], 1)]
		print(ans)
		start = max(arr[0], 1)
		for i in range(1, n):
			tot_chars = max(arr[i - 1], arr[i], 1)
			old_chars = arr[i - 1]
			new_chars = tot_chars - old_chars
			ans = ans[:old_chars] + lttr[start:start + new_chars]
			start += new_chars
			print(ans)
		tot_chars = max(arr[n - 1], 1)
		old_chars = arr[n - 1]
		new_chars = tot_chars - old_chars
		ans = ans[:old_chars] + lttr[start:start + new_chars]
		print(ans)
main()


def tc():
	n = int(input())
	a = [int(x) for x in input().split()]
	l = max(max(a), 1)
	out = ['a'] * (l + 1)
	print('a' * l)
	for pref in a:
		if out[pref] == 'a':
			out[pref] = 'b'
		else:
			out[pref] = 'a'
		print(''.join(out[:-1]))
T = int(input())
for _ in range(T):
	tc()


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	c = ['a' for i in range(100)]
	count = 1
	for i in c:
		print(i, end='')
	d = c[:]
	print()
	for i in range(n):
		if ord(d[a[i]]) >= 122:
			d = d[:a[i]] + [chr(ord(d[a[i]]) - 1)]
		else:
			d = d[:a[i]] + [chr(ord(d[a[i]]) + 1)]
		d += 'a' * (100 - len(d))
		for i in d:
			print(i, end='')
		print()


for _ in range(int(input()) if True else 1):
	n = int(input())
	a = list(map(int, input().split()))
	ans = ['a' * 100]
	for i in range(n):
		ans += [ans[-1][:a[i]] + chr(ord(ans[-1][a[i]]) + 1) if ans[-1][a[i]] != 'z' else 'a']
		ans[-1] = ans[-1] + 'a' * (100 - len(ans[-1]))
	for each in ans:
		print(each)


(z, zz) = (input, lambda : list(map(int, z().split())))
(szz, dgraphs, mod) = (lambda : sorted(zz()), {}, 10 ** 9 + 7)
from string import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
num = int(z())
for _ in range(num):
	n = int(z())
	l = zz()
	pre = list('a' * 100)
	print(''.join(pre))
	for i in l:
		if pre[i] == 'b':
			pre[i] = 'a'
		else:
			pre[i] = 'b'
		print(''.join(pre))


for _ in range(int(input())):
	leng = int(input())
	l = list(map(int, input().split()))
	ini = ['a'] * (max(l) + 1)
	print(''.join(ini))
	for i in l:
		ini[i] = chr(97 + (ord(ini[i]) - 97 + 1) % 26)
		print(''.join(ini))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	ans = list('a' * (max(a) + 1))
	for i in range(n):
		print(''.join(ans))
		ans[a[i]] = chr(ord(ans[a[i]]) + 1)
		if ans[a[i]] > 'z':
			ans[a[i]] = 'a'
	print(''.join(ans))


import os
import sys
from io import BytesIO, IOBase
import threading
from bisect import bisect_right
from math import gcd, log
from collections import Counter

def main():
	n = int(input())
	arr = list(map(int, input().split()))
	print('a' * 100)
	prev = 'a' * 100
	c = 1
	for i in arr:
		if prev[i] == 'a':
			prev = prev[:i] + 'b' + 'a' * (100 - 1 - i)
		else:
			prev = prev[:i] + 'a' + 'b' * (100 - 1 - i)
		print(prev)
		c += 1
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	main()


z = input
mod = 10 ** 9 + 7
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0:
			return 0
	return 1
z = input
mod = 10 ** 9 + 7
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0:
			return 0
	return 1
z = input
num = int(z())
for _ in range(num):
	n = int(z())
	l = list(map(int, z().split()))
	mx = max(l)
	ans = ['a' * (mx + 1)] * (n + 1)
	for (i, x) in enumerate(l):
		who = 'a' if ans[i][x] == 'b' else 'b'
		ans[i + 1] = ans[i][:x] + who + ans[i][x + 1:]
	print('\n'.join(ans))


def getInts():
	return [int(x) for x in input().split()]

def solve():
	[n] = getInts()
	a = getInts()
	l = max(a)
	s = 'a' * max(l, 1)
	print(s)
	for i in range(n):
		k = a[i]
		newS = s[:k]
		for j in range(k, len(s)):
			nextChar = ord(s[j]) - ord('a') + 1
			newS += chr(nextChar % 26 + ord('a'))
		s = newS
		print(s)
[tc] = getInts()
for i in range(tc):
	solve()


import random

def show():
	for i in ans:
		print(i, end='')
	print()

def randn(num):
	n = num
	while n == num:
		n = random.randint(0, 25)
	return n
alp = list('abcdefghijklmnopqrstuvwxyz')
ans = alp + alp[::-1]
test = int(input())
for _ in range(test):
	input()
	arr = list(map(int, input().split()))
	show()
	for i in arr:
		ans[i] = alp[randn(ord(ans[i]) - 97)]
		show()


from sys import stdin
from math import ceil, gcd
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	arr = list(map(int, stdin.readline().split()))
	ans = []
	ans.append('a' * 200)
	for i in range(n):
		k = ans[-1]
		if k[arr[i]] == 'a':
			k = k[0:arr[i]] + 'b' + k[arr[i] + 1:]
		else:
			k = k[0:arr[i]] + 'a' + k[arr[i] + 1:]
		ans.append(k)
	for ele in ans:
		print(ele)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = ['a' * 50]
	val = 98
	for i in range(n):
		s = b[i][0:a[i]]
		if chr(val) == b[i][-1]:
			val += 1
			if val == 123:
				val = 97
		s += chr(val) * (50 - a[i])
		b += [s]
		val += 1
		if val == 123:
			val = 97
	for i in range(n + 1):
		print(b[i])


t = int(input())
while t:
	n = int(input())
	st = input()
	tmp = st.split()
	a = []
	for i in range(n):
		a.append(int(tmp[i]))
	sol = []
	len1 = a[0]
	s1 = 'a' * 200
	sol.append(s1)
	for i in range(n):
		last = sol[-1]
		L = list(last)
		if L[a[i]] == 'a':
			L[a[i]] = 'b'
		else:
			L[a[i]] = 'a'
		s1 = ''
		s1 = s1.join(L)
		sol.append(s1)
	for i in sol:
		print(i)
	t -= 1


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	maxi = max(a)
	s = 'a' * max(a)
	p = list(s)
	ans = [p]
	used = 'a'
	if max(a) == 0:
		ans = ['a']
		used = 'a'
		for i in range(n):
			if used == 'z':
				used = 'a'
			ans.append(chr(ord(used) + 1))
			used = chr(ord(used) + 1)
	else:
		for i in range(n):
			if used == 'z':
				used = 'a'
			q = p[0:a[i]] + [chr(ord(used) + 1)] * (maxi - a[i])
			used = chr(ord(used) + 1)
			ans.append(q)
			p = q
	for it in ans:
		print(*it, sep='')


t = [98] * 51
for s in [*open(0)][2::2]:
	for x in [0] + s.split():
		t[int(x)] ^= 1
		print(''.join(map(chr, t)))


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	a = ['a'] * 200
	print(*a, sep='')
	for i in l:
		for j in range(i, 200):
			if a[j] == 'b':
				a[j] = 'a'
			elif a[j] == 'a':
				a[j] = 'b'
		print(*a, sep='')


from sys import stdin, setrecursionlimit, stdout
from collections import deque
from math import log2, log, ceil, sqrt
input = stdin.readline
setrecursionlimit(int(200000.0))

def getstr():
	return input()[:-1]

def getint():
	return int(input())

def getints():
	return list(map(int, input().split()))

def getint1():
	return list(map(lambda x: int(x) - 1, input().split()))
jn = lambda x, l: x.join(map(str, l))

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return res

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
(y, n) = ('YES', 'NO')

def solve():
	x = getint()
	y = getints()
	s = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
	d = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
	e = 'qwertyuiopsbdfghjklzxcvnmqwertyuiopsbdfghjklzxcvnmqwertyuiopsbdfghjklzxcvnmqwertyuiopsbdfghjklzxcvnm'
	print(s)
	st = 0
	for i in range(x):
		p = s[:y[i]] + e[st] + d
		print(p)
		st += 1
		s = p
for _ in range(getint()):
	solve()


t = int(input())
for test in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	ans = ['abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz']
	for i in l:
		s = ''
		s = ans[-1][:i]
		s += ans[-1][i + 1:]
		s += ans[-1][i]
		ans.append(s)
	for ele in ans:
		print(ele)


def solve(n, A):
	cur = 'a' * 51
	cur = ['a' for _ in range(51)]
	print(''.join(cur))
	for i in range(n):
		c = cur[A[i]]
		if c == 'z':
			cur[A[i]] = 'a'
		else:
			cur[A[i]] = chr(ord(c) + 1)
		print(''.join(cur))
	return
t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	solve(n, A)


def main():
	testcase = int(input())
	for _ in range(testcase):
		n = int(input())
		a = list(map(int, input().split()))
		ans = []
		m = max(a) + 1
		alpha = [chr(i) for i in range(ord('b'), ord('z') + 1)]
		c = 1
		ans.append('a' * m)
		for i in a:
			temp = ans[-1]
			ch = alpha[c]
			ans.append(temp[:i] + ch * (m - i))
			c += 1
			if c == len(alpha):
				c = 0
		for i in ans:
			print(i)
main()


a = 'abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxy'
a = list(a)
for ii in range(int(input())):
	n = int(input())
	b = list(map(int, input().split()))
	print(''.join(a))
	for j in b:
		c = a[j]
		v = ord(c)
		if c == 'z':
			v = v - 1
		else:
			v = v + 1
		a[j] = chr(v)
		print(''.join(a))


d = {}
for i in range(26):
	d[i] = chr(97 + i)
for _ in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	answer = []
	st = ''
	t = 0
	for i in range(51):
		st = st + d[t]
		t = (t + 1) % 26
	prev = st
	print(st)
	for i in range(n):
		if prev[li[i]] == 'a':
			st = prev[:li[i]] + 'b' + prev[li[i] + 1:]
		else:
			st = prev[:li[i]] + 'a' + prev[li[i] + 1:]
		prev = st
		print(prev)


T = int(input())

def makeStr(n, posb, ch1, ch2):
	ret = ''
	for i in range(0, n + 1):
		if i != posb:
			ret += ch1
		else:
			ret += ch2
	return ret

def solve(arr):
	maxEl = max(arr)
	flag = 0
	(ch1, ch2) = ('a', 'b')
	for n in arr:
		if n != 0:
			s = makeStr(maxEl, n, ch1, ch2)
			if s[-1] == 'b':
				s_old = s
				flag = 1
			if flag == 1:
				print(s_old)
			else:
				flag = 0
				print(s)
		else:
			(ch1, ch2) = (ch2, ch1)
			s = makeStr(maxEl, n, ch1, ch2)
			print(s)
	if n == 0:
		print('c')
	else:
		print(s[0:n])

def makeStr2(n, ch):
	ret = ''
	for i in range(0, n):
		ret += ch
	return ret

def solve(arr):
	(ch1, ch2) = ('a', 'b')
	if arr[0] != 0:
		s = makeStr2(arr[0], 'a')
	else:
		(ch1, ch2) = (ch2, ch1)
		s = ch1
	print(s)
	for i in range(0, len(arr) - 1):
		ns = max(arr[i], arr[i + 1])
		np = arr[i]
		pref = s[0:np]
		if arr[i + 1] == 0:
			ns = 1
		s = pref + makeStr2(ns - np, ch2)
		print(s)
	print(s[0:arr[-1]] + 'c')

def solve2(arr):
	s = makeStr2(arr[0] + 1, 'a')
	print(s)
	for i in range(0, len(arr) - 1):
		ns = max(arr[i], arr[i + 1])
		if ns == 0:
			ns = 1
		np = arr[i]
		pref = s[0:np]
		ch2 = 'bcd'[i % 3]
		s = pref + makeStr2(ns - np, ch2)
		print(s)
	print(s[0:arr[-1]] + 'z')

def solve3(arr):
	maxLen = max(arr) + 1
	s = makeStr2(maxLen, 'a')
	print(s)
	for i in range(0, len(arr)):
		s1 = s[0:arr[i]]
		s2 = 'a' if s[arr[i]] == 'b' else 'b'
		s2 = s2 + s[arr[i] + 1:]
		s = s1 + s2
		print(s)
while T > 0:
	n = int(input())
	arr = [int(el) for el in input().split(' ')]
	solve3(arr)
	T -= 1


from sys import stdin, stdout
import math
import heapq
t = 1

def aint():
	return int(input().strip())

def lint():
	return list(map(int, input().split()))

def fint():
	return list(map(int, stdin.readline().split()))

def main():
	n = aint()
	l = lint()
	print('a' * 100)
	prev = 'a' * 100
	for i in range(n):
		curr = ''
		for j in range(l[i]):
			curr += prev[j]
		if prev[l[i]] == 'a':
			curr += 'b'
		else:
			curr += 'a'
		curr += 'a' * (100 - l[i] - 1)
		print(curr)
		prev = curr
	return
t = int(input())
for i in range(t):
	main()


from collections import defaultdict
import io
import os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	p = 'a' * 100
	print(p)
	for i in a:
		s = ''
		s += p[:int(i)]
		if p[int(i)] == 'a':
			s += 'b'
		else:
			s += 'a'
		for j in range(int(i), 100):
			s += 'a'
		p = s
		print(p)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	m = max(arr)
	if m == 0:
		m = 1
	s = 'a' * m
	print(s)
	for i in range(n):
		t = ''
		for j in range(m):
			if j < arr[i]:
				t += s[j]
			elif ord(s[j]) == 122:
				t += 'a'
			else:
				t += chr(ord(s[j]) + 1)
		print(t)
		s = t[:]


from sys import stdin, stdout

def arrinp():
	return [*map(int, stdin.readline().split(' '))]

def mulinp():
	return map(int, stdin.readline().split(' '))

def intinp():
	return int(stdin.readline())

def inp():
	return stdin.readline()

def solution():
	n = int(input())
	prefixes = list(map(int, input().split()))
	s = 'a' * 52
	val = 'bcdefghijklmnopqrstuvwxyz'
	val_lenght = len(val)
	target = 0
	print(s)
	for i in prefixes:
		s = s[:i] + val[target] + s[i:]
		print(s)
		target += 1
		if target >= val_lenght:
			target = 0
testcases = 1
testcases = intinp()
for _ in range(testcases):
	solution()


extras = ['c', 'd']
letters = ['a', 'b']
val = 0
t = int(input())
for i in range(t):
	n = int(input())
	A = [int(s) for s in input().split()]
	S = []
	S.append('a' * A[0] + extras[0])
	for j in range(1, n):
		mod = j % 2
		if A[j] <= A[j - 1]:
			S.append(S[j - 1][0:A[j - 1]] + extras[mod])
		else:
			if A[j - 1] == 0:
				if letters[val] == S[j - 1][0]:
					val = 1 - val
			elif letters[val] != S[j - 1][A[j - 1]]:
				k = 0
			else:
				val = 1 - val
			S.append(S[j - 1][0:A[j - 1]] + letters[val] * (A[j] - A[j - 1]) + extras[mod])
	S.append(S[n - 1][0:A[n - 1]] + extras[n % 2])
	print('\n'.join(S))


import bisect
import os
import gc
import sys
from io import BytesIO, IOBase
from collections import Counter
from collections import deque
import heapq
import math
import statistics

def sin():
	return input()

def ain():
	return list(map(int, sin().split()))

def sain():
	return input().split()

def iin():
	return int(sin())
MAX = float('inf')
MIN = float('-inf')
MOD = 1000000007

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	s = set()
	for p in range(2, n + 1):
		if prime[p]:
			s.add(p)
	return s

def readTree(n, m):
	adj = [deque([]) for _ in range(n + 1)]
	for _ in range(m):
		(u, v) = ain()
		adj[u].append(v)
		adj[v].append(u)
	return adj

def main():
	for _ in range(iin()):
		n = iin()
		l = ain()
		d = deque([])
		p = 1
		for i in range(n):
			if i == 0:
				if l[i] == 0:
					d.append('a')
					d.append('b')
					p = 3
				else:
					d.append('a' * l[i])
					d.append('a' * l[i])
					p = 2
			elif l[i] == 0:
				d.append(chr(p + 96))
				p = p + 1
				if p == 27:
					p = 1
			else:
				x = len(d[-1])
				if x >= l[i]:
					d.append(d[-1][:l[i]])
				else:
					d[-1] = d[-1] + chr(p + 96) * (l[i] - x)
					d.append(d[-1])
					p = p + 1
					if p == 27:
						p = 1
		for i in d:
			print(i)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
if os.getcwd() == 'D:\\code':
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
	input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input(''))
arr = []
for m in range(t):
	input('')
	arr.append(list(map(int, input().split())))
s = ['a'] * 52
for i in arr:
	print(''.join(s))
	for j in i:
		if s[j] == 'a':
			s[j] = 'b'
		else:
			s[j] = 'a'
		print(''.join(s))


t1 = [98] * 51
for s in [*open(0)][2::2]:
	for x in [0] + s.split():
		t1[int(x)] ^= 1
		print(*map(chr, t1), sep='')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	x = max(arr)
	if x == 0:
		x = 1
	out = ['a' * x]
	for j in range(n):
		a = out[j][:arr[j]]
		b = out[j][arr[j]:arr[j] + 1]
		if x != arr[j]:
			c = chr((ord(b) + 1 - ord('a')) % 26 + ord('a'))
		else:
			c = ''
		out.append(a + c * (x - arr[j]))
	for p in out:
		print(p)


def ChangeCharAtPos(bef, pos, chan):
	return bef[:pos] + chan + bef[pos + 1:]
t = int(input())
for ti in range(t):
	n = int(input())
	L = map(int, input().split())
	st = 'a' * 53
	print(st)
	for l in L:
		st = ChangeCharAtPos(st, l, chr((ord(st[l]) - 97 + 1) % 26 + 97))
		print(st)
exit(0)


for _ in range(int(input())):
	n = int(input())
	list1 = [int(i) for i in input().split()]
	final = ['a'] * 52
	print(''.join(final))
	for i in range(n):
		if final[list1[i]] == 'a':
			final[list1[i]] = 'b'
		else:
			final[list1[i]] = 'a'
		print(''.join(final))


for _ in range(int(input())):
	n = int(input())
	L = [int(x) for x in input().split()]
	s = 'a'
	for i in range(1, 200):
		s = s + chr(97 + i % 26)
	print(s)
	for x in L:
		ch = chr((ord(s[x]) - 97 + 1) % 26 + 97)
		s = s[:x] + ch + s[x + 1:]
		print(s)


T = int(input())
for case in range(T):
	i = int(input())
	ls = [int(x) for x in input().split()]
	m = max(ls) + 1
	d = {'a': 0, 'b': 1}
	laste = 0
	last = 'a' * m
	print(last)
	for (n, e) in enumerate(ls):
		if last[e] == 'a':
			last = last[:e] + len(last[e:]) * 'b'
		else:
			last = last[:e] + len(last[e:]) * 'a'
		print(last)


t = int(input())
for s in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	a.append(0)
	visit = [[] for i in range(n + 1)]
	for i in range(a[0]):
		visit[0].append(97)
	if a[0] == 0:
		visit[0].append(97)
	(i, v) = (0, 1)
	(j, maxi) = (1, 0)
	while j <= n:
		maxi = max(a[i], a[j])
		if maxi == 0 and a[i] == 0:
			visit[j].append(97 + v % 26)
			v += 1
		for k in range(a[i]):
			visit[j].append(visit[i][k])
		d = maxi - a[i]
		if d > 0:
			for p in range(d):
				visit[j].append(97 + v % 26)
				v += 1
		j += 1
		i += 1
	for i in visit:
		for j in i:
			print(chr(j), end='')
		print()


import sys, os.path
from collections import deque
from fractions import Fraction as f

def IO():
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	else:
		input = sys.stdin.readline
		print = sys.stdout.write

def nextInt():
	return int(input())

def nextTuple():
	return [int(a) for a in input().split()]

def nextArray():
	return list(map(int, input().split()))

def nextLine():
	return input()

def nextStringArray():
	return list(input().split())
IO()
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = 'abcdefghijklmnopqrstuvwxyz'
	dict = {}
	for i in range(25):
		dict[s[i]] = s[i + 1]
	dict['z'] = 'a'
	s = 'a' * 200
	print(s)
	for i in range(n):
		p = s[0:a[i]] + dict[s[a[i]]] + s[a[i] + 1:]
		s = p
		print(p)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = ['a'] * 150
	str1 = s.copy()
	print(''.join(str1))
	str1[l[0]] = 'b'
	print(''.join(str1))
	for i in range(1, n):
		if str1[l[i]] == 'b':
			str1[l[i]] = 'a'
		else:
			str1[l[i]] = 'b'
		print(''.join(str1))


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	l = ['abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmn']
	cur = 26
	for i in range(n):
		s = ''
		ct = 0
		j = 0
		while j < len(l[i]) - 1:
			if j + 1 <= a[i]:
				s += l[i][j]
				j += 1
			else:
				prev = l[i][j]
				j += 1
				cur = l[i][j]
				if prev == cur:
					j += 1
				s += l[i][j]
		l.append(s)
	for i in l:
		print(i)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = 'a' * 52
	print(s)
	for _ in a:
		sn = s[:_]
		for x in range(_, len(s)):
			if s[x] == 'a':
				sn += 'b'
			else:
				sn += 'a'
		s = sn
		print(s)


for _ in range(int(input())):
	n = int(input())
	arr = [int(num) for num in input().split(' ')]
	x = max(arr) + 1
	s = ['a' * x]
	for i in range(n):
		a = [w for w in s[-1]]
		for j in range(0, arr[i]):
			a[j] = s[-1][j]
		for j in range(arr[i], x):
			if s[-1][j] == 'a':
				a[j] = 'b'
			else:
				a[j] = 'a'
		s.append(''.join(a))
	for item in s:
		print(item)


import sys
import bisect as bi
import math
from collections import defaultdict as dd
import heapq
input = sys.stdin.readline
mo = 10 ** 9 + 7

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())
for i in range(inin()):
	n = inin()
	l = ain()
	curchar = 'abcdefghijklmnopqrstuvwxyz' * 5
	s = 'a' * 100
	t = 1
	k = s
	print(s)
	for i in range(1, n):
		ma = max(l[i], l[i - 1])
		if ma == 0:
			k = curchar[t]
		else:
			k = s[0:l[i - 1]] + curchar[t] * (ma - l[i - 1])
		s = k
		print(k)
		if ma != l[i - 1] or l[i - 1] == 0:
			t += 1
	if l[-1] == 0:
		print(curchar[t])
	else:
		print(k[:l[-1]])


s = ''
for i in range(1, 10):
	for j in range(97 + i - 1, 122):
		s += chr(j)
k = s
t = int(input())
for i in range(t):
	s = k
	n = int(input()) - 1
	print(s)
	a = [int(i) for i in input().split()]
	for i in range(len(a)):
		if s[a[i]] != 'z':
			s = s[0:a[i]] + chr(ord(s[a[i]]) + 1) + s[a[i] + 1:len(s)]
		else:
			s = s[0:a[i]] + 'a' + s[a[i] + 1:len(s)]
		print(s)


import math

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b / gcd(a, b)

def bs(arr, l, r, x):
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return arr[mid]
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def swap(list, pos1, pos2):
	(list[pos1], list[pos2]) = (list[pos2], list[pos1])
	return list

def subarrayBitwiseOR(A):
	res = set()
	pre = {0}
	for x in A:
		pre = {x | y for y in pre} | {x}
		res |= pre
	return len(res)
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = 'a'
	print(s * 100)
	x = s * 100
	for i in range(n):
		if x[a[i]] == 'a':
			print(x[:a[i]] + 'b' * (100 - a[i]))
			x = x[:a[i]] + 'b' * (100 - a[i])
		else:
			print(x[:a[i]] + 'a' * (100 - a[i]))
			x = x[:a[i]] + 'a' * (100 - a[i])


for _ in range(int(input())):
	_ = int(input())
	(*arr,) = list(map(int, input().split()))
	max_len = max(arr) + 1
	ans = ['a'] * max_len
	print(''.join(ans))
	for n in arr:
		if ans[n] == 'a':
			ans[n] = 'b'
		else:
			ans[n] = 'a'
		print(''.join(ans))


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans = ['a' * 51] * (n + 1)
	s = ''
	for (i, x) in enumerate(a):
		if ans[i][x] == 'a':
			s = 'b'
		else:
			s = 'a'
		ans[i + 1] = ans[i][:x] + s + ans[i][x + 1:]
	for i in ans:
		print(i)


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	n = inputnum()
	a = inputlist()
	s = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
	print(s)
	for i in range(n):
		if s[a[i]:a[i] + 1] == 'a':
			s = s[:a[i]] + 'b' + s[a[i] + 1:]
			print(s)
		else:
			s = s[:a[i]] + 'a' + s[a[i] + 1:]
			print(s)


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	res = []
	for i in range(n + 1):
		res.append('a' * (max(l) + 1))
	for i in range(len(l)):
		if res[i][l[i]] == 'a':
			for j in range(i + 1, len(res)):
				res[j] = res[i][:l[i]] + 'b' + res[i][l[i] + 1:]
		else:
			for j in range(i + 1, len(res)):
				res[j] = res[i][:l[i]] + 'a' + res[i][l[i] + 1:]
	for i in res:
		print(i)


from string import ascii_lowercase
from itertools import cycle
for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	res = []
	letters = cycle(ascii_lowercase)
	res.append([next(letters) for i in range(a[0])])
	res.append(res[0][:])
	if len(res[0]) == 0:
		res[0].append(next(letters))
	for i in range(1, n):
		for j in range(a[i] - len(res[i])):
			l = next(letters)
			if l == res[i - 1][0]:
				l = next(letters)
			res[i].append(l)
		if len(res[i]) == 0:
			l = next(letters)
			if l == res[i - 1][0]:
				l = next(letters)
			res[i].append(l)
		res.append(res[i][:a[i]])
	for i in range(n + 1):
		if len(res[i]) == 0:
			l = next(letters)
			if l == res[i - 1][0]:
				l = next(letters)
			res[i].append(l)
	for i in res:
		print(''.join(i))


tc = int(input())
for t in range(tc):
	n = int(input())
	a = [int(x) for x in input().split()]
	ans = ['a' * max(a[0], 1)]
	for i in range(1, n + 1):
		ans.append('')
		if a[i - 1] == 0:
			if ans[i - 1][0] == 'a':
				ans[i] = 'b'
			else:
				ans[i] = 'a'
		elif a[i - 1] <= len(ans[i - 1]):
			ans[i] = ans[i - 1][:a[i - 1]]
		else:
			if i >= 2:
				if len(ans[i - 2]) <= len(ans[i - 1]):
					ans[i - 1] += 'a' * (a[i - 1] - len(ans[i - 1]))
				else:
					uc = ans[i - 2][len(ans[i - 1])]
					if uc == 'a':
						uc = 'b'
					else:
						uc = 'a'
					ans[i - 1] += uc * (a[i - 1] - len(ans[i - 1]))
			else:
				ans[i - 1] += 'a' * (a[i - 1] - len(ans[i - 1]))
			ans[i] = ans[i - 1][:a[i - 1]]
	for s in ans:
		print(s)


def create(A):
	strings = []
	s = ['a'] * 60
	strings.append(''.join(s))
	for i in A:
		s[i] = 'a' if s[i] == 'b' else 'b'
		strings.append(''.join(s))
	return strings
for t in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	strings = create(A)
	for i in strings:
		print(i)


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split(' ')))
	maxl = max(a) + 1
	s = 'a' * maxl
	print(s)
	for c in a:
		s = s[:c] + ('a' if s[c] != 'a' else 'b') + s[c + 1:]
		print(s)


for _ in range(int(input())):
	input()
	s = 'a' * 60
	print(s)
	for v in map(int, input().split()):
		s = s[:v] + chr((ord(s[v]) - ord('a') + 1) % 26 + ord('a')) + s[v + 1:]
		print(s)


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		b = [0] * (len(a) + 1)
		b[0] = a[0]
		for i in range(1, len(a)):
			b[i] = max(a[i], a[i - 1])
		b[-1] = a[-1]
		s = []
		s.append('a' * b[0])
		if a[0] == 0:
			s[0] = 'a'
		for i in range(1, len(b)):
			if b[i] == 0:
				if s[i - 1][0] == 'a':
					x = 'b'
				else:
					x = 'a'
			else:
				x = s[i - 1][:a[i - 1]]
				tmp = 'a'
				if len(s[i - 1]) > a[i - 1]:
					if s[i - 1][a[i - 1]] == 'a':
						tmp = 'b'
				x += tmp * (b[i] - a[i - 1])
			s.append(x)
		print('\n'.join(s))
main()


for _ in range(int(input())):
	l = int(input())
	nums = [int(x) for x in input().strip().split()]
	ini = ['a'] * (max(nums) + 1)
	print(''.join(ini))
	for n in nums:
		ini[n] = chr((ord(ini[n]) - ord('a') + 1) % 20 + ord('a'))
		print(''.join(ini))


for _ in range(int(input())):
	num = int(input())
	a = list(map(int, input().split()))
	if max(a) == 0:
		print('b')
		ch = 'c'
		for i in range(num):
			print(ch)
			if ch == 'c':
				ch = 'b'
			else:
				ch = 'c'
		continue
	maxi = max(a)
	s = 'a' * (maxi * 2)
	print(s)
	for i in range(num):
		if a[i] == 0:
			if s[0] == 'a':
				s = 'b' * (maxi * 2)
				print(s)
			else:
				s = 'a' * (maxi * 2)
				print(s)
			continue
		if s[a[i]] == 'a':
			ch = 'b'
			s = s[:a[i]] + ch + s[a[i] + 1:]
		else:
			ch = 'a'
			s = s[:a[i]] + ch + s[a[i] + 1:]
		print(s)


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		s = ['a' * (max(a) + 1)] * (n + 1)
		for (i, x) in enumerate(a):
			c = 'a' if s[i][x] == 'b' else 'b'
			s[i + 1] = s[i][:x] + c + s[i][x + 1:]
		print('\n'.join(s))
main()


import sys
input = sys.stdin.readline

def main(n, a):
	maxx = max(a)
	res = ['a' * (maxx + 2)]
	for i in a:
		if res[-1][i] == 'a':
			res.append(res[-1][:i] + 'b' + res[-1][i + 1:])
		elif res[-1][i] == 'b':
			res.append(res[-1][:i] + 'a' + res[-1][i + 1:])
	print('\n'.join(res))
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	main(n, a)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s1 = 'a' * 50
	l = []
	l.append(s1)
	for j in range(n):
		S1 = s1[0:a[j]]
		if a[j] < 50:
			if ord(s1[a[j]]) + 1 <= 122:
				S1 = S1 + chr(ord(s1[a[j]]) + 1) + s1[a[j] + 1:]
			else:
				S1 = S1 + chr(ord(s1[a[j]]) - 1) + s1[a[j] + 1:]
		s1 = S1
		l.append(s1)
	for j in range(n + 1):
		print(l[j])


from sys import stdin, stdout

def input():
	return stdin.readline()

def prin(x):
	return stdout.write(str(x) + '\n')
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(k) for k in input().split()]
	l = []
	s = 'abcdefghijklmnopqrstuvwxyz'
	x = a[0]
	if a[0] == 0:
		j = 0
		l.append('a')
		l.append('b')
		zero = 1
	else:
		st = ''
		for j in range(a[0]):
			st += s[j % 26]
		l.append(st)
		l.append(st)
		zero = 0
	for i in range(1, n):
		if a[i] == 0:
			l.append(s[(s.index(l[-1][0]) + 1) % 26])
			zero = 1
		elif a[i] > a[i - 1]:
			y = a[i] - a[i - 1]
			if zero != 1:
				for k in range(y):
					if s[(j + 1) % 26] == l[-1][-1]:
						j += 1
					l[-1] += s[(j + 1) % 26]
					j += 1
				l.append(l[-1])
			else:
				for k in range(y - 1):
					if s[(j + 1) % 26] == l[-1][-1]:
						j += 1
					l[-1] += s[(j + 1) % 26]
					j += 1
				l.append(l[-1])
			zero = 0
		elif a[i] < a[i - 1]:
			l.append(l[i - 1][:a[i]])
			zero = 0
		elif a[i] == a[i - 1]:
			l.append(l[-1])
	for i in range(n + 1):
		print(l[i])


def next(cur):
	if cur != 'z':
		cur = chr(ord(cur) + 1)
	else:
		cur = 'a'
	return cur

def get_part_str(len, start):
	res = ''
	for i in range(len):
		start = next(start)
		res += start
	return (res, start)

def get_a(arr):
	cur = 'a'
	res = [cur * arr[0], cur * arr[0]]
	cur = next(cur)
	res[0] += cur
	cur = next(cur)
	res[1] += cur
	for i in range(1, len(arr)):
		if arr[i] < arr[i - 1]:
			(part, cur) = get_part_str(1, cur)
			s = res[i][:arr[i]] + part
			res.append(s)
		elif arr[i] > arr[i - 1]:
			s = res[i]
			(part, cur) = get_part_str(arr[i] - len(res[i]), cur)
			s += part
			cur = next(cur)
			s += cur
			res[i] += part
			cur = next(cur)
			res[i] += cur
			res.append(s)
		elif arr[i] == arr[i - 1]:
			if arr[i] == 0:
				cur = next(cur)
				res.append(cur)
			else:
				s = res[-1][:-1]
				cur = next(cur)
				s += cur
				res.append(s)
	return res
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	x = get_a(arr)
	for i in x:
		print(i)


import sys
INP = lambda : sys.stdin.readline().strip()
INT = lambda : int(INP())
MAP = lambda : list(map(int, INP().split()))
ARR = lambda : [int(i) for i in INP().split()]

def JOIN(arr, x=''):
	return x.join([str(i) for i in arr])

def EXIT(x='NO'):
	print(x)
	return
for _ in range(INT()):
	n = INT()
	arr = ARR()
	ans = list('ab' * (max(arr) // 2 + 1))
	print(JOIN(ans))
	for x in arr:
		ans[x] = 'b' if ans[x] == 'a' else 'a'
		print(JOIN(ans))


for _ in range(int(input())):
	n = int(input())
	arr = list((int(i) for i in input().split()))
	tmp = 'a' * 55
	print(tmp)
	for i in arr:
		b = list(tmp)
		if b[i] == 'a':
			b[i] = 'b'
		else:
			b[i] = 'a'
		tmp = b
		print(''.join(b))


t = int(input())
for _ in range(t):
	n = int(input())
	inp = [int(j) for j in input().split()]
	dict = {}
	len = max(inp)
	if len == 0:
		len = 1
	temp = 97
	cnt = 0
	s1 = ''
	for j in range(len):
		if temp == 122:
			temp = 97
		s1 = s1 + chr(temp)
		temp = temp + 1
	dict[cnt] = s1
	for i in range(n):
		s = dict[cnt][:inp[i]]
		for j in range(inp[i], len):
			if int(ord(dict[cnt][j])) == 122:
				s = s + chr(ord(dict[cnt][j]) - 20)
			else:
				s = s + chr(ord(dict[cnt][j]) + 1)
		cnt = cnt + 1
		dict[cnt] = s
	for i in range(n + 1):
		print(dict[i])


import sys
import math
from collections import defaultdict, Counter
t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	m = max(a)
	print('a' * (m + 1))
	prev = 'a' * (m + 1)
	for j in a:
		d = ord(prev[j]) + 1
		if d > 122:
			d -= 26
		print(prev[:j] + chr(d) * (m + 1 - j))
		prev = prev[:j] + chr(d) * (m + 1 - j)


q = int(input())
for o in range(q):
	n = int(input())
	a = list(map(int, input().split()))
	ans = 'a' * 52
	ans1 = ''
	print(ans)
	for i in range(n):
		for j in range(a[i]):
			ans1 += ans[j]
		for j in range(a[i], 52):
			if ans[j] == 'a':
				ans1 += 'b'
			else:
				ans1 += 'a'
		print(ans1)
		ans = ans1
		ans1 = ''


def nextchar(a):
	if a == 'z':
		return 'a'
	else:
		return chr(ord(a) + 1)
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	mystr = 'a' * (max(arr) + 1)
	print(mystr)
	for i in range(0, n):
		mystr = list(mystr)
		mystr[arr[i]] = nextchar(mystr[arr[i]])
		mystr = ''.join(mystr)
		print(str(mystr))


alphabet = 'qwertyuiopasdfghjklzxcvbnm'

def solve():
	n = int(input())
	a = list(map(int, input().split()))
	last = 'a' * 51
	print(last)
	for i in range(n):
		last = last[:a[i]] + alphabet[alphabet.index(last[a[i]]) - 1] + 'a' * 50
		print(last)
for _ in range(int(input())):
	solve()


t = int(input())
for i in range(t):
	n = int(input())
	b = list(map(int, input().split()))
	s = []
	s.append(['a'] * 51)
	j = 0
	while j < n:
		k = s[-1]
		p = k[:b[j]]
		if k[b[j]] == 'a':
			p += ['b'] * (51 - b[j])
		else:
			p += ['a'] * (51 - b[j])
		s.append(p)
		j += 1
	for j in s:
		print(''.join(j))


import sys
import math
from functools import reduce
import bisect

def getN():
	return int(input())

def getNM():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def input():
	return sys.stdin.readline().rstrip()

def index(a, x):
	i = bisect.bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return -1
	return i
for _ in range(int(input())):
	n = getN()
	a = list(map(int, input().split()))
	strs = ['a' * max(a[0], 1)]
	now = 'a'
	for i in range(n - 1):
		if a[i] == 0:
			now = 'z' if strs[-1][0] == 'a' else 'a'
			strs.append(now * max(a[i + 1], 1))
		else:
			s = strs[-1][:a[i]]
			if a[i] < a[i + 1]:
				if len(strs[-1]) > a[i]:
					now = 'z' if strs[-1][a[i]] == 'a' else 'a'
				s += now * (a[i + 1] - a[i])
			strs.append(s)
	if a[-1]:
		strs.append(strs[-1][:a[-1]])
	else:
		strs.append('ivan')
	for line in strs:
		print(line)


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	uni = 97
	template = []
	counter = 0
	while counter < 200:
		if uni == 123:
			uni = 97
		template.append(uni)
		uni += 1
		counter += 1
	print(*[chr(el) for el in template], sep='')
	for length in a:
		template[length] = template[length] + 1 if template[length] <= 121 else 97
		print(*[chr(el) for el in template], sep='')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	l = max(a)
	l1 = []
	if max(a) == 0:
		s = 'a'
		l2 = []
		l2.append(s)
		for i in range(n):
			l2.append(chr(ord(l2[-1]) + 1))
		for j in l2:
			print(j)
	else:
		s = 'a' * max(a)
		l1.append(s)
		for i in range(n):
			s1 = ''
			for j in range(a[i]):
				s1 = s1 + l1[-1][j]
			for k in range(a[i], l):
				if ord(l1[-1][k]) == 122:
					s1 = s1 + chr(97)
				else:
					s1 = s1 + chr(ord(l1[-1][k]) + 1)
			l1.append(s1)
		for i in l1:
			print(i)


for test in range(int(input())):
	n = int(input())
	prefixes = list(map(int, input().split()))
	s = 'a' * 52
	val = 'bcdefghijklmnopqrstuvwxyz'
	val_lenght = len(val)
	target = 0
	print(s)
	for i in prefixes:
		s = s[:i] + val[target] + s[i:]
		print(s)
		target += 1
		if target >= val_lenght:
			target = 0


tc = int(input())
for _ in range(tc):
	n = int(input())
	a = list(map(int, input().split()))
	mx = max(a)
	ans = ['a' * (mx + 1)] * (n + 1)
	for (i, x) in enumerate(a):
		s = 'a' if ans[i][x] == 'b' else 'b'
		ans[i + 1] = ans[i][:x] + s + ans[i][x + 1:]
	print('\n'.join(ans))


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def main():
	for _ in range(int(input())):
		n = int(input())
		a = [int(x) for x in input().split(' ')]
		mx = max(a)
		ans = ['a' * (mx + 1)] * (n + 1)
		for (i, x) in enumerate(a):
			who = 'a' if ans[i][x] == 'b' else 'b'
			ans[i + 1] = ans[i][:x] + who + ans[i][x + 1:]
		print('\n'.join(ans))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
k = 0
while k < t:
	n = int(input())
	l = list(map(int, input().split()))
	word = 'a' * 200
	print(word)
	for i in range(len(l)):
		new = ''
		for j in range(l[i]):
			new += word[j]
		for j in range(l[i], 200):
			if word[j] == 'a':
				new += 'b'
			else:
				new += 'a'
		word = new
		print(word)
	k += 1


import sys, functools, math, copy
tc = int(sys.stdin.readline())
for _ in range(tc):
	n = int(sys.stdin.readline())
	arr = list(map(int, sys.stdin.readline().split()))
	ans = [[ord('a')] * (max(arr) + 1)]
	for i in range(n):
		now = ans[-1]
		temp = []
		for j in now:
			temp.append(j)
		if temp[arr[i]] + 1 > 122:
			temp[arr[i]] -= 26
		temp[arr[i]] += 1
		ans.append(temp)
	for i in ans:
		print(''.join(map(chr, i)))


t = int(input())
for t1 in range(t):
	n = int(input())
	num = list(map(int, input().split()))
	samplestr = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
	print(samplestr)
	samplestr = list(samplestr)
	for data in num:
		for da in range(data, 100):
			if ord(samplestr[da]) > 121:
				samplestr[da] = chr(ord(samplestr[da]) - 20)
			else:
				samplestr[da] = chr(ord(samplestr[da]) + 1)
		print(''.join(samplestr))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	z = 'a'
	l = ''
	if a[0] == 0:
		print(z)
		z = 'b'
		s = 'b'
	else:
		print(z * a[0])
		s = z * a[0]
	for i in range(1, n):
		if a[i] == 0:
			print(s)
			if z == 'a':
				s = 'b'
				z = 'b'
			else:
				s = 'a'
				z = 'a'
		elif a[i - 1] == 0:
			s = s * a[i]
			print(s)
		elif a[i] == a[i - 1]:
			print(s)
		elif a[i] > a[i - 1]:
			if l == '':
				s += 'a' * (a[i] - a[i - 1])
			elif l == 'b':
				s += 'a' * (a[i] - a[i - 1])
			else:
				s += 'b' * (a[i] - a[i - 1])
			print(s)
			l = ''
		else:
			print(s)
			l = s[a[i]]
			s = s[:a[i]]
	print(s)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = 'a' * 200
	c = 'a'
	d = 'b'
	print(s)
	for i in range(n):
		if s[a[i]] == c:
			s1 = s[:a[i]] + d + s[a[i] + 1:]
			print(s1)
			s = s1
		else:
			s1 = s[:a[i]] + c + s[a[i] + 1:]
			print(s1)
			s = s1


from string import ascii_lowercase as alps
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	m = max(a + [1])
	l = [[''] * m for _ in range(n + 1)]
	for i in range(m):
		l[0][i] = alps[i % 26]
	for i in range(1, n + 1):
		c = a[i - 1]
		l[i][:c] = l[i - 1][:c]
		if c != m:
			x = alps.index(l[i - 1][c]) + 1
			for j in range(c, m):
				l[i][j] = alps[x % 26]
				x += 1
	for i in l:
		print(*i, sep='')


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	b = ord('a')
	s = 'a' * 200
	print(s)
	for i in range(n):
		b += 1
		if b == ord('z'):
			b = ord('a')
		s = s[:a[i]] + chr(b) * (200 - a[i])
		print(s)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	A = 'a' * 50
	print(A)
	prev = A
	for i in arr:
		now = ''
		for j in range(50):
			if j < i:
				now += prev[j]
			elif prev[j] == 'a':
				now += 'b'
			else:
				now += 'a'
		prev = now
		print(now)


import random
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	t = max(a)
	i = 97
	if t == 0:
		while n >= 0:
			print(chr(i))
			n -= 1
			i += 1
			if i // 122:
				i = 97
	else:
		s = chr(97) * t
		print(s)
		for j in a:
			n = s
			s = s[0:j] + chr(i + 1) * (t - j)
			if n != s:
				i += 1
			if i // 122:
				i = 97 + random.randrange(5, 13)
			print(s)


tc = int(input())
while tc > 0:
	tc -= 1
	n = int(input())
	a = list(map(int, input().rstrip().split()))
	s = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
	print(s)
	for i in range(n):
		temp = a[i]
		if s[temp] != 'x':
			print(s[:temp], end='')
			print('x', end='')
			print(s[temp + 1:])
			s = s[:temp] + 'x' + s[temp + 1:]
		else:
			print(s[:temp], end='')
			print('y', end='')
			print(s[temp + 1:])
			s = s[:temp] + 'y' + s[temp + 1:]


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	L = list(map(int, input().split()))
	MAX = max(L) + 1
	ans = ['a' * MAX]
	for i in L:
		cur = 'a' if ans[-1][i] == 'b' else 'b'
		ans.append(ans[-1][:i] + cur * (MAX - i))
	print('\n'.join(ans))


import sys
input = sys.stdin.buffer.readline
t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	l = []
	bc = max(a)
	words = ['a' * (bc + 1)] * (n + 1)
	for (i, ele) in enumerate(a):
		onlychange = 'a' if words[i][ele] == 'b' else 'b'
		words[i + 1] = words[i][:ele] + onlychange + words[i][ele + 1:]
	print('\n'.join(words))


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	n = int(input())
	lcp = list(map(int, input().split()))
	s = ['a' for x in range(200)]
	ans = [[x for x in s]]
	for item in lcp:
		if ans[-1][item] == s[item]:
			if s[item] == 'a':
				s[item] = 'b'
			else:
				s[item] = 'a'
			ans.append([x for x in s])
	for item in ans:
		print(''.join(item))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	myvar = max(a)
	t = 'a' * (myvar + 1)
	dic = {}
	dic['a'] = 'b'
	dic['b'] = 'a'
	for i in a:
		print(t)
		if t[i] == 'a':
			t = t[:i] + 'b' + t[i + 1:]
		else:
			t = t[:i] + 'a' + t[i + 1:]
	print(t)


T = int(input())
for t in range(T):
	n = int(input())
	a = list(map(int, input().split()))
	s = 'a' * 200
	print(s)
	for i in range(n):
		if s[a[i]] == 'a':
			temp = s[:a[i]]
			temp += 'b'
			s = temp + s[a[i] + 1:]
		else:
			temp = s[:a[i]]
			temp += 'a'
			s = temp + s[a[i] + 1:]
		print(s)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	m = max(a)
	cur = 'a' * (m + 1)
	print(cur)
	for i in a:
		cur = cur[:i] + chr(ord('a') + (ord(cur[i]) + 1 - ord('a')) % 26) + cur[i + 1:]
		print(cur)


t = int(input())
for i in range(t):
	n = int(input())
	lst1 = list(map(int, input().split()))
	s = []
	for j in range(200):
		s.append('a')
	print(''.join(s))
	for j in range(len(lst1)):
		if s[lst1[j]] == 'a':
			s[lst1[j]] = 'b'
		else:
			s[lst1[j]] = 'a'
		print(''.join(s))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	sp = 'a' * (a[0] + 1)
	sn = ''
	print(sp)
	for i in range(1, n):
		if a[i - 1] >= a[i]:
			sn = sp[:a[i - 1]]
			if sp[a[i - 1]] == 'a':
				sn = sn + 'b'
			else:
				sn = sn + 'a'
		else:
			sn = sp[:a[i - 1]]
			if sp[a[i - 1]] == 'a':
				sn = sn + 'b'
			else:
				sn = sn + 'a'
			sn = sn + 'a' * (a[i] - a[i - 1])
		print(sn)
		sp = sn
	if sp[a[n - 1]] == 'b':
		print(sp[:a[n - 1]] + 'a')
	else:
		print(sp[:a[n - 1]] + 'b')


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd, log
from collections import deque
from bisect import bisect_left, bisect_right
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	z = ['a' * 100]
	for i in range(n):
		s = z[-1][:l[i]]
		if l[i] != 100:
			t = 'a'
			for j in range(97, 123):
				if chr(j) != z[-1][l[i]]:
					t = chr(j)
					break
			s += t + 'a' * (100 - l[i] - 1)
		z.append(s)
	for i in z:
		print(i)


T = int(input())
while T > 0:
	T = T - 1
	N = int(input())
	numbers = list(map(int, input().split()))
	output_word = 'a' * 101
	print(output_word)
	for x in range(len(numbers)):
		common_freq = numbers[x]
		to_flip = output_word[common_freq]
		if to_flip == 'a':
			output_word = output_word[:common_freq] + 'b' + output_word[common_freq + 1:-1] + output_word[-1]
		else:
			output_word = output_word[:common_freq] + 'a' + output_word[common_freq + 1:-1] + output_word[-1]
		print(output_word)


q = int(input())
for _ in range(q):
	n = int(input())
	dat = list(map(int, input().split()))
	l = ['a'] * 200
	print(''.join(l))
	for i in range(n):
		l[dat[i]] = 'a' if l[dat[i]] == 'b' else 'b'
		print(''.join(l))


t = int(input())
while t > 0:
	n = int(input())
	arr = [int(x) for x in input().split()]
	result = []
	result.append('a' * 52)
	for i in range(n):
		temp = result[-1]
		str = temp[0:arr[i]]
		if temp[arr[i]] == 'a':
			str += 'b' * (52 - len(str))
		else:
			str += 'a' * (52 - len(str))
		result.append(str)
	for i in result:
		print(i)
	t -= 1


from collections import defaultdict
import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange

def print_case_iterable(case_num, iterable):
	print('Case #{}: {}'.format(case_num, ' '.join(map(str, iterable))))

def print_case_number(case_num, iterable):
	print('Case #{}: {}'.format(case_num, iterable))

def print_iterable(A):
	print(' '.join(A))

def read_int():
	return int(f.readline().strip())

def read_int_array():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def read_string():
	return list(f.readline().strip())

def ri():
	return int(f.readline().strip())

def ria():
	return [int(x) for x in f.readline().strip().split(' ')]

def rns():
	a = [x for x in f.readline().split(' ')]
	return (int(a[0]), a[1].strip())

def rs():
	return list(f.readline().strip())

def bi(x):
	return bin(x)[2:]
from collections import deque
import math
NUMBER = 10 ** 9 + 7

def factorial(n):
	M = NUMBER
	f = 1
	for i in range(1, n + 1):
		f = f * i % M
	return f

def mult(a, b):
	return a * b % NUMBER

def minus(a, b):
	return (a - b) % NUMBER

def plus(a, b):
	return (a + b) % NUMBER

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, y, x) = egcd(b % a, a)
		return (g, x - b // a * y, y)

def modinv(a):
	m = NUMBER
	(g, x, y) = egcd(a, m)
	if g != 1:
		raise Exception('modular inverse does not exist')
	else:
		return x % m

def choose(n, k):
	if n < k:
		assert false
	return mult(factorial(n), modinv(mult(factorial(k), factorial(n - k)))) % NUMBER
from collections import deque, defaultdict
import heapq
from types import GeneratorType

def bootstrap(f, stack=[]):

	def wrappedfunc(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		else:
			to = f(*args, **kwargs)
			while True:
				if type(to) is GeneratorType:
					stack.append(to)
					to = next(to)
				else:
					stack.pop()
					if not stack:
						break
					to = stack[-1].send(to)
			return to
	return wrappedfunc

def dfs(g, timeIn, timeOut, depths, parents):
	cnt = 0
	stack = [[1, 0, 0, 0]]
	while stack:
		(v, neig_i, parent, depth) = stack[-1]
		parents[v] = parent
		depths[v] = depth
		if neig_i == 0:
			timeIn[v] = cnt
			cnt += 1
		while neig_i < len(g[v]):
			u = g[v][neig_i]
			if u == parent:
				neig_i += 1
				continue
			stack[-1][1] = neig_i + 1
			stack.append([u, 0, v, depth + 1])
			break
		if neig_i == len(g[v]):
			stack.pop()
			timeOut[v] = cnt
			cnt += 1
cnt = 0

@bootstrap
def dfs(v, adj, timeIn, timeOut, depths, parents, parent=0, depth=0):
	global cnt
	parents[v] = parent
	depths[v] = depth
	timeIn[v] = cnt
	cnt += 1
	for u in adj[v]:
		if u == parent:
			continue
		yield dfs(u, adj, timeIn, timeOut, depths, parents, v, depth + 1)
	timeOut[v] = cnt
	cnt += 1
	yield

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)

def get_num_2_5(n):
	twos = 0
	fives = 0
	while n > 0 and n % 2 == 0:
		n //= 2
		twos += 1
	while n > 0 and n % 5 == 0:
		n //= 5
		fives += 1
	return (twos, fives)

def shift(a, i, num):
	for _ in range(num):
		(a[i], a[i + 1], a[i + 2]) = (a[i + 2], a[i], a[i + 1])

def equal(x, y):
	return abs(x - y) <= 1e-09

def getAngle(a, b, c):
	ang = math.degrees(math.atan2(c[1] - b[1], c[0] - b[0]) - math.atan2(a[1] - b[1], a[0] - b[0]))
	return ang + 360 if ang < 0 else ang

def getLength(a, b):
	return math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
from heapq import heapify, heappush, heappop

def bfs(adj):
	s = set()
	d = defaultdict(set)
	q = deque([])
	s.add(0)
	d[0].add(0)
	q.append((0, 0))
	while len(q) > 0:
		(v, depth) = q.popleft()
		for u in adj[v]:
			if u not in s:
				s.add(u)
				d[depth + 1].add(u)
				q.append((u, depth + 1))
	return d

@bootstrap
def dfs(u, top, adj, vis):
	vis[u] = 1
	for (v, d) in adj[u]:
		if vis[v] == 2 or d == 0:
			continue
		if vis[v] == 1:
			yield 'No'
		x = (yield dfs(v, top, adj, vis))
		if x == 'No':
			yield 'No'
	vis[u] = 2
	top.append(u)
	yield

def isSubsetSum(arr, n, summ):
	subarr = [[False for i in range(summ + 1)] for i in range(n + 1)]
	for i in range(n + 1):
		subarr[i][0] = True
	for i in range(1, summ + 1):
		subarr[0][i] = False
	for i in range(1, n + 1):
		for j in range(1, summ + 1):
			if j < arr[i - 1]:
				subarr[i][j] = subarr[i - 1][j]
			if j >= arr[i - 1]:
				subarr[i][j] = subarr[i - 1][j] or subarr[i - 1][j - arr[i - 1]]
	return subarr[n][summ]

def find_lcm(a, b):
	return a * b // gcd(a, b)

def find_lcm_array(A):
	if len(A) == 1:
		return A[0]
	lcm = find_lcm(A[0], A[1])
	for i in range(2, len(A)):
		lcm = find_lcm(lcm, A[i])
	return lcm

def solution(a, n):
	res = ['a' * 50]
	for i in range(n):
		x = a[i]
		if x == 50:
			res.append(res[-1])
			continue
		temp = res[-1]
		char = res[-1][x]
		char = 'a' if char == 'z' else 'z'
		res.append(temp[:x] + char + temp[x + 1:])
	return '\n'.join(res)

def main():
	T = 1
	T = ri()
	for i in range(T):
		n = ri()
		a = ria()
		x = solution(a, n)
		if 'xrange' not in dir(__builtins__):
			print(x)
		else:
			(print >> output, 'Case #' + str(i + 1) + ':', str(x))
	if 'xrange' in dir(__builtins__):
		print(output.getvalue())
		output.close()
if 'xrange' in dir(__builtins__):
	import cStringIO
	output = cStringIO.StringIO()
main()


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans = []
	s = 'a' * 100
	ans.append(s)
	prev = 0
	prev_string = s
	for i in range(n):
		s = s[:a[i]]
		if prev_string[a[i]] == 'a':
			s = s + 'b' * (100 - a[i])
		else:
			s = s + 'a' * (100 - a[i])
		ans.append(s)
		prev_string = s
	for i in ans:
		print(i)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	l = [0] * (n + 1)
	l[0] = a[0]
	l[-1] = a[-1]
	for i in range(1, n):
		l[i] = max(a[i], a[i - 1])
	s = ['a' * max(a[0], 1)]
	for i in range(n):
		if len(s[-1]) == a[i]:
			s.append(s[-1] + (l[i + 1] - a[i]) * 'a')
		else:
			k = list(s[-1])
			k[a[i]] = chr((ord(k[a[i]]) - 97 + 1) % 26 + 97)
			s.append(''.join(k) + (l[i + 1] - len(k)) * 'a')
	[print(i) for i in s]


for s in [*open(0)][2::2]:
	a = ['a'] * 51
	f = 'ab'
	print(''.join(a))
	for i in s.split():
		i = int(i)
		a[i] = f[1 - f.index(a[i])]
		print(''.join(a))


t = int(input())
alf = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = 'a' * a[0] + 'z' * 100
	print(s)
	j = 0
	for i in range(n):
		if j == 26:
			j = 0
		while alf[j] == s[a[i]]:
			j += 1
			if j == 26:
				j = 0
		s = s[:a[i]]
		s += alf[j] * (200 - a[i] - 1)
		print(s)


t = int(input())
for T in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	mx = max(a)
	if mx == 0:
		mx = 1
	ans = ['a' * mx]
	nxt = 'a' * a[0] + 'b' * (mx - a[0])
	ans.append(nxt)
	for i in range(1, n):
		val = a[i]
		prev = ans[-1]
		nxt = prev[:a[i]]
		if a[i] < len(prev):
			if prev[a[i]] == 'b':
				nxt += 'a'
			if prev[a[i]] == 'a':
				nxt += 'b'
			rest = prev[a[i] + 1:]
			nxt += rest
		ans.append(nxt)
	for i in ans:
		print(i)


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = []
	f = 'a' * 200
	f = list(f)
	s.append(f[::1])
	for i in range(n):
		if ord(f[l[i]]) + 1 > 122:
			f[l[i]] = 'a'
		else:
			f[l[i]] = chr(ord(f[l[i]]) + 1)
		s.append(f[::1])
	for i in s:
		print(''.join(i))


import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
(t,) = I()
for _ in range(t):
	(n,) = I()
	l = I()
	ar = ['a' * 55]
	for i in range(n):
		x = ar[-1][:l[i]]
		x = x + ('c' if ar[-1][l[i]] == 'b' else 'b') * (55 - len(x))
		ar.append(x)
	for i in ar:
		print(i)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	mx = max(arr)
	ans = ['a' * (mx + 1)] * (n + 1)
	for (i, x) in enumerate(arr):
		who = 'a' if ans[i][x] == 'b' else 'b'
		ans[i + 1] = ans[i][:x] + who + ans[i][x + 1:]
	print('\n'.join(ans))


from math import *
inf = 10 ** 10

def _in():
	return [int(x) for x in input().split(' ')]
s = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'

def inc_chr(c):
	val = (ord(c) - 96) % 26
	return chr(val + 97)

def main():
	n = int(input())
	arr = _in()
	ans = ['a']
	(curr, prev) = (0, 0)
	for i in arr:
		if i == 0:
			ans.append(inc_chr(ans[-1][0]))
		elif i > len(ans[-1]):
			ans[-1] = ans[-1] + chr(97 + curr) * (i - len(ans[-1]))
			ans.append(ans[-1])
		elif i == len(ans[-1]):
			ans.append(ans[-1])
		else:
			ans.append(ans[-1][:i])
			curr = (curr + 1) % 26
		prev = i
	for i in ans:
		print(i)
tt = 1
tt = int(input())
for _ in range(tt):
	main()


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	ans = 'a' * 52
	print(ans)
	for i in range(1, n):
		ans = ans[:a[i - 1]] + ('b' if ans[a[i - 1]] != 'b' else 'a') + ans[a[i - 1] + 1:]
		print(ans)
	ans = ans[:a[-1]] + ('b' if ans[a[-1]] != 'b' else 'a') + ans[a[-1] + 1:]
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	ma = max(l) + 2
	ans = [['f' for i in range(200)] for i in range(n + 1)]
	last = -1
	for j in range(1, n + 1):
		ans[j][:l[j - 1] + 1] = ans[j - 1][:l[j - 1] + 1]
		if ans[j][l[j - 1]] == 'u':
			ans[j][l[j - 1]] = 'f'
		else:
			ans[j][l[j - 1]] = 'u'
	for k in ans:
		print(''.join(k))


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	prev = 'a' * 52
	print(prev)
	for el in arr:
		curr = prev[:el]
		for j in range(el, len(prev)):
			if prev[j] == 'a':
				curr += 'b'
			else:
				curr += 'a'
		prev = curr
		print(prev)


for _ in range(int(input())):
	n = int(input())
	aa = list(map(int, input().split()))
	l = max(aa) + 1
	ans = ['a' * l]
	for a in aa:
		cur = 'a' if ans[-1][a] == 'b' else 'b'
		ans.append(ans[-1][:a] + cur * (l - a))
	print('\n'.join(ans))


a = input()
for x in range(int(a)):
	b = input()
	c = input().split(' ')
	list1 = [int(i) for i in c]
	string = {'a': 'b', 'b': 'a'}
	tag = max(list1)
	if tag == 0:
		ans = ['a']
	else:
		ans = ['a'] * tag
	print(''.join(ans))
	buffer = 0
	for i in list1:
		for j in range(i, len(ans)):
			ans[j] = string[ans[j]]
		print(''.join(ans))


t = int(input().split()[0])
for case in range(t):
	n = int(input().split()[0])
	arr = list(map(int, input().split()))
	ans = []
	ans.append('a' * 51)
	for i in range(n):
		diff = chr(ord(ans[i][arr[i]]) + 1)
		if ord(diff) > 122:
			diff = 'a'
		ans.append(ans[i][:arr[i]] + diff * (51 - arr[i]))
	for i in range(n + 1):
		print(ans[i])


t = int(input())
while t:
	n = int(input())
	l = []
	l = list(map(int, input().split()))
	s = ['a' for i in range(55)]
	print(''.join(s))
	for i in range(n):
		if s[l[i]] == 'a':
			s[l[i]] = 'b'
		else:
			s[l[i]] = 'a'
		print(''.join(s))
	t -= 1


t = int(input())
while t:
	n = int(input())
	a = [int(x) for x in input().split()]
	maxStrLen = max(a)
	if maxStrLen == 0:
		for i in range(len(a) + 1):
			print(chr(i + 97))
		t = t - 1
		continue
	initStr = ''
	for i in range(min(maxStrLen, 26)):
		initStr += chr(i + 97)
	if maxStrLen > 26:
		for j in range(maxStrLen - 26):
			initStr += chr(j + 97)
	print(initStr)
	for ele in a:
		if len(initStr) > ele:
			if initStr[ele] != 'z':
				initStr = initStr[:ele] + chr(ord(initStr[ele]) + 1) + initStr[ele + 1:]
			else:
				initStr = initStr[:ele] + chr(ord(initStr[ele]) - 1) + initStr[ele + 1:]
		print(initStr)
	t = t - 1


def func(s, i):
	s_ = list(s[:i])
	s_ += ['a' if char == 'b' else 'b' for char in s[i:]]
	s_ = ''.join(s_)
	return s_
t = int(input())
for _ in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	(a, mx) = (1, max(ar))
	s = 'a' * max(1, mx)
	for num in ar:
		print(s)
		s = func(s, num)
	print(s)


import sys
infile = sys.stdin
next(infile)
alpha = 'abcdefghijklmnopqrstuvwxyz'
for line in infile:
	n = int(line)
	ans = {}
	l = list(map(int, infile.readline().split()))
	if l[0] == 0:
		ans[0] = alpha[0] * 3
	else:
		ans[0] = alpha[0] * l[0]
	if n > 26:
		alpha = alpha + 'abdfh' + n // 26 * alpha
	for i in range(0, n):
		com = l[i]
		length = len(ans[i])
		if com == 0:
			ans[i + 1] = alpha[i + 1] * 3
		if i in ans.keys():
			if len(ans[i]) < com:
				if com > l[i - 1]:
					ans[i] = ans[i] + alpha[i + 1] * (com - len(ans[i]))
		else:
			ans[i] = alpha[i] * com
		if i + 1 in ans.keys():
			if len(ans[i + 1]) < com:
				ans[i + 1] = ans[i + 1] + alpha[i + 1] * (com - len(ans[i + 1]))
		else:
			ans[i + 1] = ans[i][0:com]
	anslist = list(ans.values())
	print(*anslist, sep='\n')


def prntasstr(l):
	for i in l:
		print(i, end='')
	print(end='\n')
t = int(input())
while t:
	s = ['a'] * 200
	n = int(input())
	prntasstr(s)
	for i in map(int, input().split()):
		s[i] = 'b' if s[i] == 'a' else 'a'
		prntasstr(s)
	t -= 1


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
for _ in range(ii()):
	n = ii()
	a = li()
	ans = [['a'] * 200]
	for i in range(n):
		t = [c for c in ans[i]]
		for j in range(a[i], 200):
			if t[j] == 'a':
				t[j] = 'b'
			else:
				t[j] = 'a'
		ans.append(t)
	print(*[''.join(i) for i in ans], sep='\n')


import math

def mi():
	return map(int, input().split())

def ii():
	return int(input())

def li():
	return list(map(int, input().split()))

def si():
	return input().split()
t = ii()
for _ in range(t):
	n = ii()
	a = li()
	m = max(a) + 1
	print('a' * m)
	cu = 'a' * m
	for i in range(n):
		chng = ord(cu[a[i]]) + 1
		if chng > 122:
			chng = 97
		tmp = cu[:a[i]] + chr(chng) + cu[a[i] + 1:]
		print(tmp)
		cu = tmp


t = int(input())
while t:
	n = int(input())
	l = list(map(int, input().split()))
	s = ['a'] * 51
	print(''.join(s))
	for i in l:
		s1 = ord(s[i]) + 1
		if s1 >= 122:
			s1 = 97
		s[i] = chr(s1)
		print(''.join(s))
	t = t - 1


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans = []
	for i in range(n):
		if i == 0:
			ans.append('a' * 200)
			ans.append('a' * a[i] + 'b' * (200 - a[i]))
		elif ans[-1][a[i]] == 'b':
			ans.append(ans[-1][:a[i]] + 'a' * (200 - a[i]))
		else:
			ans.append(ans[-1][:a[i]] + 'b' * (200 - a[i]))
	for i in range(n + 1):
		print(ans[i])


import random

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	ans = [[0 for i in range(max(a) + 10)] for j in range(n + 1)]
	for i in range(1, n + 1):
		f = 1
		for j in range(a[i - 1]):
			ans[i][j] = ans[i - 1][j]
		if ans[i - 1][a[i - 1]] == 25:
			f = -24
		ans[i][a[i - 1]] = ans[i - 1][a[i - 1]] + f
	for i in ans:
		t = ''
		for j in i:
			t += chr(ord('a') + j)
		print(t)


I = lambda : list(map(int, input().split()))
import collections as cc
for tc in range(int(input())):
	(n,) = I()
	l = I()
	temp = 'a' * 51
	temp = list(temp)
	ans = [temp]
	print(''.join(temp))
	for i in range(n - 1):
		for j in range(l[i], len(temp)):
			temp[j] = 'a' if temp[j] == 'b' else 'b'
		print(''.join(temp))
	for j in range(l[-1], len(temp)):
		temp[j] = 'a' if temp[j] == 'b' else 'b'
	print(''.join(temp))


import sys
input = sys.stdin.readline
t = int(input())
letters = 'abcdefghijklmnopqrst'
for _ in range(t):
	l = int(input())
	a = list(map(int, input().split()))
	s = 'k' * 200
	print(s[:200])
	for e in range(l):
		c = s[:a[e]]
		for j in range(a[e], 200):
			for let in letters:
				if let != s[j]:
					c += let
					break
		s = c
		print(s[:200])


def func(n):
	n = list(map(int, n.split()))
	longest = max(1, max(n))
	l = len(n)
	s = [['a' for i in range(longest)]]
	for i in n:
		if i == longest:
			s.append(s[-1])
		else:
			last = s[-1].copy()
			new = ord(last[i]) + 1
			if new == ord('z') + 1:
				new = ord('a')
			last[i] = chr(new)
			s.append(last)
	return s

def main():
	t = int(input())
	t_input = []
	for i in range(t):
		input()
		t_input.append(input())
	for i in list(map(func, t_input)):
		for j in i:
			print(''.join(j))
main()


for _ in range(int(input())):
	n = int(input().strip())
	arr = list(map(int, input().strip().split(' ')))
	ans = ['p']
	alpha = 'qazwsxedcrfvtgbyhnmujiklop'
	al = 0
	for a in arr:
		if a > len(ans[-1]):
			temp = ans[-1]
			while len(temp) != a:
				temp += alpha[al % 25]
			ans[-1] = temp
			ans.append(temp)
			al += 1
		elif a == 0:
			temp = alpha[al % 25]
			al += 1
			ans.append(temp)
		elif a < len(ans[-1]):
			las = ans[-1]
			temp = ''
			for k in range(a):
				temp += las[k]
			ans.append(temp)
			al += 1
		else:
			ans.append(ans[-1])
	for a in ans:
		print(a)


t = int(input())
for _ in range(t):
	n = int(input())
	line = input()
	ar = line.split()
	ar = [int(i) for i in ar]
	la = max(ar)
	ans = list()
	c = 'a'
	temp = False
	if la == 0:
		for i in range(n + 1):
			if i % 2 == 0:
				ans.append('b')
			else:
				ans.append('c')
	else:
		s = c * la
		ans.append(s)
		for i in range(n):
			s = ans[i][0:ar[i]]
			for j in range(ar[i], la):
				if ans[i][j] == 'a':
					s += 'b'
				else:
					s += 'a'
			ans.append(s)
	for j in ans:
		print(j)


T = int(input())
for t in range(T):
	n = int(input())
	arr = [int(i) for i in input().split()]
	l = ['a' * arr[0]]
	if arr[0] == 0:
		l[0] = 'a'
	print(l[0])
	for i in range(n - 1):
		size = max(arr[i], arr[i + 1])
		curr = ''
		if size == 0:
			if l[-1][0] != 'z':
				curr += chr(ord(l[-1][0]) + 1)
			else:
				curr += 'a'
		elif size == arr[i]:
			curr = l[-1][0:size]
		else:
			curr += l[-1][0:arr[i]]
			if len(l[-1]) > len(curr):
				if l[-1][arr[i]] != 'z':
					curr += chr(ord(l[-1][arr[i]]) + 1) * (arr[i + 1] - arr[i])
				else:
					curr += 'a' * (arr[i + 1] - arr[i])
			else:
				curr += 'a' * (arr[i + 1] - arr[i])
		print(curr)
		l.append(curr)
	curr = l[-1][0:arr[n - 1]]
	if curr == '':
		if l[-1][0] != 'z':
			curr += chr(ord(l[-1][0]) + 1)
		else:
			curr += 'a'
	print(curr)


from __future__ import division, print_function
import itertools, os, sys, threading
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
from math import gcd
from bisect import bisect
from random import randrange
input = lambda : sys.stdin.readline().rstrip('\r\n')
read = lambda : list(map(int, input().strip().split(' ')))

def main():
	for _ in range(int(input())):
		n = int(input())
		arr = read()
		string = 'a' * 200
		alph = {}
		s = 97
		for i in range(26):
			alph[chr(s)] = s - 97
			s += 1
		print(string)
		for i in range(n):
			string = string[:arr[i]] + chr((alph[string[arr[i]]] + 1) % 26 + 97) * (200 - arr[i])
			print(string)
main()


cases = int(input())
for i in range(cases):
	n = int(input())
	l2 = input().split(' ')
	arr = []
	for a in l2:
		arr.append(int(a))
	first = []
	ans = []
	for j in range(50):
		first.append('a')
	ans.append(first)
	start = 0
	for k in arr:
		prev = ans[start][:]
		for l in range(k, 50):
			if prev[l] == 'a':
				prev[l] = 'b'
			else:
				prev[l] = 'a'
		ans.append(prev)
		start += 1
	for ele in ans:
		print(''.join(ele))


t = int(input())
for z in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	p = 'a' * 100
	print(p)
	for i in a:
		s = p[:i]
		k = ord(p[i])
		k += 1
		if k == 123:
			k = 97
		s += chr(k)
		s += 'a' * (100 - len(s))
		print(s)
		p = s


t = int(input())
for tt in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	a += [0]
	curr = 'a' * a[0] if a[0] else 'a'
	print(curr)
	for i in range(1, n + 1):
		if a[i - 1] == 0 and a[i] == 0:
			let = curr[0]
			curr = chr((ord(let) - ord('a') + 1) % 26 + ord('a'))
		elif a[i - 1] >= a[i]:
			curr = curr[:a[i - 1]]
		else:
			prefix = curr[:a[i - 1]]
			let = curr[a[i - 1]] if len(curr) > a[i - 1] or a[i - 1] == 0 else 'a'
			extra = a[i] - a[i - 1]
			curr = prefix + chr((ord(let) - ord('a') + 1) % 26 + ord('a')) * extra
		print(curr)


t = int(input())
while t > 0:
	n = int(input())
	a = list(map(int, input().split()))
	l = ['a'] * 50
	s = ''
	for i in range(50):
		s += l[i]
	print(s)
	for i in range(n):
		z = a[i]
		for j in range(z, 50):
			if l[j] == 'a':
				l[j] = 'b'
			else:
				l[j] = 'a'
		s = ''
		for j in range(50):
			s += l[j]
		print(s)
	t -= 1


import math
from sys import stdin, stdout
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	f = 0
	ans = []
	a = 1
	if l[0] == 0:
		ans = ['a', 'b']
		a = 2
	else:
		ans = ['a' * l[0], 'a' * l[0]]
		a = 1
	for i in range(1, n):
		s = ans[-1]
		if l[i] == 0:
			ans.append(chr(97 + a))
			a = (a + 1) % 26
		elif l[i - 1] < l[i]:
			if l[i - 1] == 0:
				s = s + chr(97 + a) * (l[i] - l[i - 1] - 1)
				ans[-1] = s
				ans.append(s)
				a = (a + 1) % 26
				continue
			s = s + chr(97 + a) * (l[i] - l[i - 1])
			a = (a + 1) % 26
			ans[-1] = s
			ans.append(s)
		else:
			ans.append(s[:l[i]])
	for i in ans:
		stdout.write(i)
		print()


import io
import os
from collections import Counter, defaultdict, deque

def solve(N, A):
	m = max(A) + 1
	s = ['a' * m]
	for (i, x) in enumerate(A):
		nextCh = chr(ord('a') + (ord(s[-1][x]) - ord('a') + 1) % 26)
		s.append(s[-1][:x] + nextCh * (m - x))
	return '\n'.join(s)
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
TC = int(input())
for tc in range(1, TC + 1):
	(N,) = [int(x) for x in input().split()]
	A = [int(x) for x in input().split()]
	ans = solve(N, A)
	print(ans)


rndid = 'cuuhkjc'
for _ in range(int(input())):
	input()
	ls = 'a' * 51
	oa = ord('a')
	print(ls)
	for a in input().split():
		a = int(a)
		ls = ls[:a] + ls[a:].translate({oa: 'b', oa + 1: 'a'})
		print(ls)


t = int(input())
for k in range(t):
	n = int(input())
	a = input().split(' ')
	print(60 * 'a')
	cur = 60 * 'a'
	for i in range(n):
		if int(a[i]) == len(cur):
			oui = 'b'
		else:
			temp = ord(cur[int(a[i])]) + 1
			if temp == 123:
				temp = 97
			oui = chr(temp)
		res = cur[:int(a[i])] + 50 * oui
		cur = res[:min(len(res), 200)]
		print(cur)


import sys
import os
import math
import copy
from math import gcd
from bisect import bisect
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations
import itertools

def Int():
	return int(sys.stdin.readline())

def Mint():
	return map(int, sys.stdin.readline().split())

def Lstr():
	return list(sys.stdin.readline().strip())

def Str():
	return sys.stdin.readline().strip()

def Mstr():
	return map(str, sys.stdin.readline().strip().split())

def List():
	return list(map(int, sys.stdin.readline().split()))

def Hash():
	return dict()

def Mod():
	return 1000000007

def Ncr(n, r, p):
	return fact[n] * (ifact[r] * ifact[n - r] % p) % p

def Most_frequent(list):
	return max(set(list), key=list.count)

def Mat2x2(n):
	return [List() for _ in range(n)]

def solution():
	for i in range(Int()):
		n = Int()
		a = List()
		b = 'a' * 51
		print(b)
		for i in a:
			b = list(b)
			if b[i] == 'b':
				b[i] = 'a'
			else:
				b[i] = 'b'
			print(''.join(b))
solution()


def solve(a, n):
	max_length = max(max(a), 1)
	strings = [''] * (n + 1)
	strings[0] = 'a' * max_length
	for i in range(n):
		strings[i + 1] = strings[i][:a[i]]
		for ch in strings[i][a[i]:]:
			strings[i + 1] += 'a' if ch == 'b' else 'b'
	for string in strings:
		print(string)
t = int(input())
for i in range(t):
	n = int(input())
	a = [int(j) for j in input().split()]
	solve(a, n)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	length = max(a)
	if length == 0:
		length = 1
	res = ['a' * length]
	for i in range(1, n + 1):
		x = res[-1][:a[i - 1]]
		if len(x) == 0:
			if res[-1][0] == 'a':
				res.append('b' * length)
			else:
				res.append('a' * length)
		elif len(x) < length:
			if res[-1][len(x)] == 'a':
				x += 'b' * (length - len(x))
			else:
				x += 'a' * (length - len(x))
			res.append(x)
		else:
			res.append(x)
	for item in res:
		print(item)


import sys
input = sys.stdin.readline
T = int(input())

def diff(x):
	if x == 'a':
		return 'b'
	return 'a'
for testcase in range(1, T + 1):
	n = int(input())
	s = list(map(int, input().split()))
	m = 200
	now = ['a'] * m
	print(''.join(now))
	for i in range(n):
		nxt = []
		for j in range(m):
			if j < s[i]:
				nxt.append(now[j])
			else:
				nxt.append(diff(now[j]))
		print(''.join(nxt))
		now = nxt


import sys
input = sys.stdin.readline
from collections import *
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	ans = [['a'] * 100 for _ in range(n + 1)]
	for i in range(n):
		for j in range(a[i]):
			ans[i + 1][j] = ans[i][j]
		ans[i + 1][a[i]] = chr((ord(ans[i][a[i]]) - ord('a') + 1) % 26 + ord('a'))
	for ans_i in ans:
		print(''.join(ans_i))


for i in range(int(input())):
	n = int(input())
	a = ['a'] * 51
	print(''.join(a))
	arr = list(map(int, input().split()))
	for i in range(len(arr)):
		a[arr[i]] = chr(ord(a[arr[i]]) + 1)
		if a[arr[i]] > 'z':
			a[arr[i]] = 'a'
		print(''.join(a))


def solve(ls):
	lim = max(ls) + 1
	flip = {'x': 'y', 'y': 'x'}
	result = []
	s = 'x' * lim
	result += [s]
	for a in ls:
		s = s[:a] + flip[s[a]] * (lim - a)
		result += [s]
	return result

def main(istr, ostr):
	t = int(istr.readline())
	for _ in range(t):
		n = int(istr.readline())
		ls = list(map(int, istr.readline().split()))
		result = solve(ls)
		print(*result, file=ostr, sep='\n')
import sys
main(sys.stdin, sys.stdout)


t = int(input())
for _ in range(t):
	n = int(input())
	a = [1] + list(map(int, input().split()))
	l = ['a' * 51]
	print('a' * 51)
	for i in range(n):
		print(l[i][:a[i + 1]] + 'b' * (51 - a[i + 1]) if l[i][a[i + 1]] == 'a' else l[i][:a[i + 1]] + 'a' * (51 - a[i + 1]))
		l.append(l[i][:a[i + 1]] + 'b' * (51 - a[i + 1]) if l[i][a[i + 1]] == 'a' else l[i][:a[i + 1]] + 'a' * (51 - a[i + 1]))


for _ in range(int(input())):
	n = int(input())
	s = ['a'] * 51
	print(*s, sep='')
	for i in map(int, input().split()):
		if s[i] == 'a':
			s[i] = 'b'
		else:
			s[i] = 'a'
		print(*s, sep='')


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(j) for j in input().split()]
	l = []
	if a[0] > 0:
		l.append('a' * a[0])
	else:
		l.append('a')
	c = 'a'
	for i in range(n):
		last = l[len(l) - 1]
		if len(last) == a[i]:
			l.append(last)
		elif len(last) > a[i]:
			if a[i] != 0:
				l.append(last[0:a[i]])
			else:
				num = ord(last[0]) + 1
				if num > 122:
					c = 'a'
				else:
					c = chr(num)
				l.append(c)
		else:
			num = ord(c) + 1
			if num > 122:
				c = 'a'
			else:
				c = chr(num)
			x = len(last)
			l[len(l) - 1] += c * (a[i] - x)
			last = l[len(l) - 1]
			l.append(last)
	for i in l:
		print(i)


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	lets = [chr(i) for i in range(97, 97 + 25)] * 8
	s = []
	mx = max(a)
	mxi = a.index(mx)
	s.append(''.join(lets))
	for i in range(1, n + 1):
		word = list(s[-1])
		if a[i - 1] < len(word):
			word.pop(a[i - 1])
		s.append(''.join(word))
	for word in s:
		print(word)


t = int(input())
while t:
	n = int(input())
	a = list(map(int, input().split()))
	ans = []
	ans.append('a' * a[0] + 'y')
	for i in range(1, n):
		s = ans[-1][:a[i - 1]]
		if i % 3 == 1:
			val = ans[-1][a[i - 1]]
			if val == 'z':
				val = 'a'
			val2 = ord(val)
			p = chr(val2 + 1)
			p = p + 'b' * a[i]
			s = s + p
		elif i % 3 == 2:
			val = ans[-1][a[i - 1]]
			if val == 'z':
				val = 'a'
			val2 = ord(val)
			p = chr(val2 + 1)
			p = p + 'c' * a[i]
			s = s + p
		else:
			val = ans[-1][a[i - 1]]
			if val == 'z':
				val = 'a'
			val2 = ord(val)
			p = chr(val2 + 1)
			p = p + 'd' * a[i]
			s = s + p
		ans.append(s)
	val = ans[-1][a[-1]]
	if val == 'z':
		val = 'a'
	val2 = ord(val)
	p = chr(val2 + 1)
	ans.append(ans[-1][:a[-1]] + p)
	for j in ans:
		print(j)
	t = t - 1


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from bisect import bisect_left
from bisect import bisect_right

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())
P = 1000000007

def main():
	for t in range(I()):
		n = I()
		arr = L()
		st1 = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
		print(st1)
		for i in range(n):
			if st1[arr[i]] == 'a':
				print(st1[0:arr[i]] + 'b' + st1[arr[i] + 1:])
				st1 = st1[0:arr[i]] + 'b' + st1[arr[i] + 1:]
			else:
				print(st1[0:arr[i]] + 'a' + st1[arr[i] + 1:])
				st1 = st1[0:arr[i]] + 'a' + st1[arr[i] + 1:]
main()


t = int(input())
for ii in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	strings = []
	sofar = 'a'
	strings.append('a')
	for i in range(n):
		if a[i] == 0:
			sofar = chr(ord(sofar) + 1)
			if ord(sofar) > 122:
				sofar = 'a'
			strings.append(sofar)
		else:
			last = strings[-1]
			if len(last) < a[i]:
				sofar = chr(ord(sofar) + 1)
				if ord(sofar) > 122:
					sofar = 'a'
				strings[-1] = last + sofar * (a[i] - len(last))
			nextStr = strings[-1][:a[i]]
			strings.append(nextStr)
	for i in strings:
		print(i)


import sys
from collections import defaultdict as dd
from collections import deque
import bisect
import heapq
import string

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))
t = ri()
alphabet = string.ascii_lowercase
for _ in range(t):
	n = ri()
	a = rl()
	ans = []
	if a[0] != 0:
		ans.append('a' * a[0])
	else:
		ans.append('a')
	for i in range(n):
		a1 = a[i]
		if i < n - 1:
			a2 = a[i + 1]
		else:
			a2 = 0
		new = ans[-1][:a1]
		if a2 > a1:
			if ans[-1] and len(ans[-1]) >= a1 + 1:
				letter = ans[-1][a1]
			else:
				letter = 'a'
			if letter != 'a':
				new += 'a' * (a2 - a1)
			else:
				new += 'b' * (a2 - a1)
		if not new:
			if ans[-1]:
				letter = ans[-1][0]
			else:
				letter = 'a'
			if letter != 'a':
				new = 'a'
			else:
				new = 'b'
		if a1 == 0:
			letter = ans[-1][0]
			if letter == 'a':
				new2 = 'b' + new[1:]
			else:
				new2 = 'a' + new[1:]
			new = new2
		ans.append(new)
	for mot in ans:
		print(mot)


test_cases = int(input())
stri = ''
final = []
for i in range(200):
	stri = stri + 'a'
for i in range(test_cases):
	n = int(input())
	l = [int(x) for x in input().split()]
	final.append(stri)
	for j in range(n):
		mystring = stri
		mystringlist = list(mystring)
		if mystringlist[l[j]] == 'a':
			mystringlist[l[j]] = 'b'
		else:
			mystringlist[l[j]] = 'a'
		op = ''.join(mystringlist)
		final.append(op)
		stri = op
for i in range(len(final)):
	print(final[i])


import math
import random
import string
from collections import Counter
for _ in range(int(input())):
	k = 'a' * 50
	n = int(input())
	a = list(map(int, input().split()))
	l = [k]
	c = 1
	for i in a:
		s = ''
		c = c + 1
		s = k[:i] + chr(99 + c % 24) * (50 - i)
		k = s
		l.append(s)
	for i in l:
		print(i)


t = int(input())
l = []
for i in range(t):
	n = int(input())
	m = list(map(int, input().split()))
	t = 1
	s = []
	if m[0] == 0:
		s.append('a')
	else:
		s.append(m[0] * 'a')
	for i in range(1, n):
		if m[i - 1] > m[i]:
			s.append(s[i - 1][0:m[i - 1]])
		elif m[i - 1] <= m[i]:
			if m[i - 1] != 0:
				try:
					s.append(s[i - 1][:m[i - 1]] + (m[i] - m[i - 1]) * f'{(chr(ord(s[i - 1][m[i - 1]]) + t) if s[i - 1][m[i - 1]] == chr(97) else chr(97))}')
				except:
					c = s[i - 1][:m[i - 1]]
					s.append(c + (m[i] - m[i - 1]) * f'{(chr(ord(c[-1]) + t) if c[-1] == chr(97) else chr(97))}')
			elif m[i] == 0:
				c = s[i - 1]
				s.append(f'{(chr(ord(c[0]) + t) if c[0] == chr(97) else chr(97))}')
			else:
				c = s[i - 1]
				s.append(m[i] * f'{(chr(ord(c[0]) + t) if c[0] == chr(97) else chr(97))}')
	if m[n - 1] == 0:
		s.append('z')
	elif m[n - 2] <= m[n - 1]:
		s.append(s[n - 1])
	else:
		s.append(s[n - 1][0:m[n - 1]])
	l.append(s)
for i in l:
	for it in i:
		print(it)


t = int(input())
from itertools import cycle
for _ in range(t):
	n = input()
	a = list(map(lambda x: int(x), input().split()))
	a.append(0)
	pool = cycle(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'])
	current = next(pool)
	if a[0] == 0:
		print(current)
		current = next(pool)
	else:
		print(current * max(a[0], 0))
	if a[0] == 0 and a[1] == 0:
		print(current)
		temp_string = current
	else:
		print(current * max(a[1], a[0]))
		temp_string = current * max(a[1], a[0])
	for i in range(1, len(a) - 1):
		if a[i] == 0 and a[i + 1] == 0:
			current = next(pool)
			temp_string = current
			print(temp_string)
		elif a[i] > a[i + 1]:
			print(temp_string[0:a[i]])
		else:
			if i == len(a) - 2:
				temp_string = temp_string[0:a[i]]
			else:
				temp_string = temp_string[0:a[i]] + next(pool) * (a[i + 1] - a[i])
			print(temp_string)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = [['a' for i in range(200)] for i in range(n + 1)]
	i = 1
	while i <= n:
		if a[i - 1] == 0:
			s[i][0] = chr(ord('a') + (ord(s[i - 1][0]) - ord('a') + 1) % 26)
		else:
			for j in range(a[i - 1]):
				s[i][j] = s[i - 1][j]
			s[i][j + 1] = chr(ord('a') + (ord(s[i - 1][j + 1]) - ord('a') + 1) % 26)
		i += 1
	for ss in s:
		print(''.join(ss))


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = ''
	for j in range(max(l) + 1):
		s += chr(ord('a') + i % 26)
	print(s)
	for j in range(n):
		if s[l[j]] == 'z':
			s = s[:l[j]] + 'a' + s[l[j] + 1:]
		else:
			s = s[:l[j]] + chr(ord(s[l[j]]) + 1) + s[l[j] + 1:]
		print(s)


cases = int(input())
chars = ['a', 'b']

def switch(char):
	if char == 'a':
		return 'b'
	elif char == 'b':
		return 'a'
for case in range(cases):
	n = int(input())
	a = [int(item) for item in input().split(' ')]
	max_elem = max(a) + 1
	string = 'a' * max_elem
	print(string)
	for item in a:
		string = string[:item] + switch(string[item]) + string[item + 1:]
		print(string)


for _ in range(int(input())):
	n = int(input())
	ans = [['a'] * 200 for _ in range(n + 1)]
	for (i, j) in enumerate(map(int, input().split())):
		for k in range(j):
			if ans[i][k] != ans[i + 1][k]:
				ans[i + 1][k] = ans[i][k]
		ans[i + 1][j] = 'a' if ans[i][j] == 'b' else 'b'
	for i in ans:
		print(''.join(i))


t = int(input())
for _ in range(t):
	n = int(input())
	l = [int(x) for x in input().split()]
	test = 'a' * 52
	f = 'b'
	a = 0
	print(test)
	for i in range(n):
		if test[l[i]] == 'b':
			f = 'a'
		elif test[l[i]] == 'a':
			f = 'b'
		print(test[0:l[i]] + f * (52 - l[i]))
		test = test[0:l[i]] + f * (52 - l[i])


def mod(x):
	if x < 'y':
		return ['z' for i in range(200)]
	else:
		return ['a' for i in range(200)]
t = int(input())
while True:
	if t == 0:
		break
	t -= 1
	n = int(input())
	a = [int(i) for i in input().split()]
	ans = []
	x = ['a' for i in range(200)]
	ans.append(''.join(x))
	for i in a:
		x = list(ans[-1][:i]) + mod(ans[-1][i])
		x = x[:200]
		ans.append(''.join(x))
	for i in ans:
		print(i)


t = int(input())
for s in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	j = 0
	ans = []
	if lst[0] != 0:
		x = chr(97) * lst[0]
	else:
		x = chr(97)
	print(x)
	for i in range(1, n):
		k = max(lst[i - 1], lst[i])
		if lst[i] == 0 and lst[i - 1] == 0:
			if j > 24:
				j = -1
			j += 1
			x = chr(97 + j)
		else:
			x = x[:lst[i - 1]]
			if k - lst[i - 1] > 0:
				if j > 24:
					j = -1
				j += 1
			x = x + chr(97 + j) * (k - lst[i - 1])
		print(x)
	if lst[n - 1] != 0:
		print(x[:lst[n - 1]])
	else:
		if j > 24:
			j = -1
		j += 1
		print(chr(97 + j))


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	words = []
	words.append('a' * (l[0] + 1))
	for i in range(n - 1):
		w = words[-1][:l[i]]
		if len(words[-1]) > l[i]:
			w += chr((ord(words[-1][l[i]]) - ord('a') + 1) % 26 + ord('a'))
		while len(w) < l[i + 1] + 1:
			w += 'a'
		words.append(w)
	la = words[-1][:l[-1]]
	if len(words[-1]) > l[-1]:
		la += chr((ord(words[-1][l[-1]]) - ord('a') + 1) % 26 + ord('a'))
	words.append(la)
	for w in words:
		print(w)


from sys import stdin, stdout
import sys

def get_ints():
	return map(int, sys.stdin.readline().strip().split())
al = 'abcdefghijklmnopqrstuvwxyz'
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(get_ints())
	M = max(a) + 1
	last = 'a' * M
	print(last)
	for i in range(n):
		last = last[:a[i]] + chr((ord(last[a[i]]) - 96) % 26 + 97) * (M - a[i])
		print(last)


num_testcases = int(input())
for testcase in range(num_testcases):
	input()
	a = [int(i) for i in input().split()]
	word_length = max(a)
	s = ['a' * (word_length + 1)]
	for common_pref in a:
		repl = 'z'
		if s[-1][common_pref] == 'z':
			repl = 'a'
		new_si = list(s[-1])
		new_si[common_pref] = repl
		s.append(''.join(new_si))
	print('\n'.join(s))


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	m = max(l)
	s = 'a' * m
	if m == 0:
		for i in range(n + 1):
			if i & 1:
				print('b')
			else:
				print('a')
	else:
		print(s)
		for i in range(n):
			if l[i] == m:
				print(s)
			else:
				if s[l[i]] == 'b':
					s1 = 'a' * (m - l[i])
				else:
					s1 = 'b' * (m - l[i])
				s = s[:l[i]] + s1
				print(s)


import sys
input = sys.stdin.readline
from string import ascii_lowercase as alpha

def solve(n, cmn_pre):
	mx_cmn = max(cmn_pre)
	res = [['a'] * (mx_cmn + 1)]
	for i in range(n):
		cmn = cmn_pre[i]
		last = res[-1]
		last_char = last[cmn]
		next_char = alpha[(alpha.index(last_char) + 1) % 26]
		new = last[:]
		new[cmn] = next_char
		res.append(new)
	return [''.join(r) for r in res]
for _ in range(int(input())):
	n = int(input())
	cmn_pre = list(map(int, input().split()))
	for s in solve(n, cmn_pre):
		print(s)


T = int(input())
for test in range(T):
	N = int(input())
	cut = [int(x) for x in input().split()]
	curr = [0 for x in range(51)]
	ans = [curr]
	for i in range(N):
		next = curr[:cut[i]] + [1 - curr[cut[i]]] + curr[cut[i] + 1:]
		ans.append(next)
		curr = next
	for l in ans:
		print(''.join(map(lambda x: 'a' if x == 0 else 'b', l)))


for _ in range(int(input())):
	N = int(input())
	seq = list(map(int, input().split()))
	res = []
	res.append('a' * 51)
	for i in range(N):
		last = res[-1][:seq[i]]
		if res[-1][seq[i]] == 'b':
			res.append(last + 'a' * (51 - seq[i]))
		else:
			res.append(last + 'b' * (51 - seq[i]))
	for r in res:
		print(r)


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	m1 = max(a)
	prev = 'a' * (m1 + 2)
	ans = [prev]
	for v in a:
		new = ''
		for i in range(m1 + 2):
			if i < v:
				new += prev[i]
			else:
				newAscii = ord(prev[i]) + 1
				if newAscii > 122:
					newAscii = 98
				new += chr(newAscii)
		prev = new
		ans += [new]
	for s in ans:
		print(s)


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	s = 'a' * 52
	print(s)
	for num in arr:
		temp = s[0:num]
		if s[num] == 'a':
			temp += 'b' * (52 - num)
		else:
			temp += 'a' * (52 - num)
		s = temp
		print(s)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
for i in range(int(input())):
	n = inp()
	li = inlt()
	ans = 'a' * 51
	print(ans)
	for c in li:
		ans = ans[:c] + ans[c:].translate({97: 98, 98: 97})
		print(ans)


def helper(temp, i, res, maxlen, current):
	if i == 0:
		newArr = list(temp)
		for j in range(len(newArr)):
			if newArr[j] == 'a':
				newArr[j] = 'b'
			else:
				newArr[j] = 'a'
			current = toggle(current)
		if maxlen % 2 == 0:
			current = toggle(current)
		res.append(newArr)
		return current
	else:
		l = maxlen - i
		newArr = temp[:i]
		t = []
		for k in range(i, maxlen):
			t.append(toggle(temp[k]))
		newArr.extend(t)
		res.append(newArr)

def solve():
	arr = [int(x) for x in input().split()]
	maxlen = max(arr)
	res = []
	if maxlen == 0:
		maxlen = 1
		temp = ['a']
	else:
		temp = ['a'] * maxlen
	res.append(temp)
	current = 'a'
	for i in arr:
		temp = res[-1]
		if i == maxlen and i != 0:
			res.append(temp)
		else:
			current = helper(temp, i, res, maxlen, current)
	for val in res:
		print(''.join(val))

def toggle(current):
	if current == 'a':
		return 'b'
	else:
		return 'a'
t = int(input())
while t > 0:
	n = int(input())
	solve()
	t -= 1


for _ in range(int(input())):
	n = int(input())
	l = [*map(int, input().split())]
	b = ['a'] * 101
	print(''.join(b))
	for i in l:
		b[i] = 'b' if b[i] == 'a' else 'a'
		print(''.join(b))


def replace(s, index, r):
	s = s[0:index] + r + s[index + 1:len(s)]
	return s
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans = (max(a) + 1) * 'a'
	print(ans)
	for x in range(n):
		if ans[a[x]] == 'a':
			temp = 'b'
		else:
			temp = 'a'
		ans = replace(ans, a[x], temp)
		print(ans)


import sys

def i():
	return sys.stdin.readline()[:-1]
letters = 'abcdefghijklmnopqrstuvwxyz'

def shift(letter):
	global letters
	return letters[(letters.index(letter) + 1) % 26]
for _ in range(int(i())):
	n = int(i())
	nums = map(int, i().split())
	print('a' * 51)
	prev = 'a' * 51
	for num in nums:
		new = prev[:num] + shift(prev[num]) + 'a' * (50 - num)
		print(new)
		prev = new


import sys
input = sys.stdin.readline
t = int(input())
for ii in range(t):
	n = int(input())
	a = [int(i) for i in input().split() if i != '\n']
	ans = ['a'] * 51
	copy = ans[:]
	print(''.join(ans))
	for i in range(n):
		if ans[a[i]] == 'z':
			ans[a[i]] = 'a'
		else:
			ans[a[i]] = 'z'
		print(''.join(ans))


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	s = 'a' * 100
	print(s)
	for i in arr:
		if s[i] == 'z':
			t = 'a'
		else:
			t = chr(ord(s[i]) + 1)
		s = s[:i] + t + s[i + 1:]
		print(s)


import math
from decimal import Decimal
import heapq
import copy
import heapq
from collections import deque

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def da():
	(n, m) = map(int, input().split())
	a = list(map(int, input().split()))
	return (n, m, a)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def lol(lst, k):
	k = k % len(lst)
	ret = [0] * len(lst)
	for i in range(len(lst)):
		if i + k < len(lst) and i + k >= 0:
			ret[i] = lst[i + k]
		if i + k >= len(lst):
			ret[i] = lst[i + k - len(lst)]
		if i + k < 0:
			ret[i] = lst[i + k + len(lst)]
	return ret

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)

def fact(n):
	tc = []
	ans = {}
	d = 2
	while d * d <= n:
		if n % d == 0:
			tc.append(d)
			n //= d
		else:
			d += 1
	if n > 1:
		tc.append(n)
	for i in tc:
		ans[i] = ans.get(i, 0) + 1
	return ans

def how_many(l, r, c):
	m = (l + r) // 2
	if r - l == 1:
		if s[l] == c:
			return 0
		else:
			return 1
	d = s[l:m]
	k1 = (r - l) // 2 - s[l:m].count(c) + how_many(m, r, chr(ord(c) + 1))
	k2 = (r - l) // 2 - s[m:r].count(c) + how_many(l, m, chr(ord(c) + 1))
	return min(k1, k2)
for _ in range(int(input())):
	n = int(input())
	s = 'qwertyuiopasdfghjklzxcvbnm'
	s = s + s + s
	s = list(s[:52])
	a = list(map(int, input().split()))
	ans = []
	for j in s:
		print(j, end='')
	print()
	for i in range(n):
		k = a[i]
		d = s[k]
		if d != 'z':
			s[k] = chr(ord(d) + 1)
		else:
			s[k] = 'a'
		for j in s:
			print(j, end='')
		print()


import math
from collections import defaultdict
import string
c = 'abcdefghijklmnopqrstuvwxyz'
ans = ['a']
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	max_ = max(l)
	ans = ['a' * 50]
	ans += [''] * n
	if l.count(0) == n:
		print('a')
		for i in range(n):
			if i % 2 == 0:
				print('b')
			else:
				print('a')
		continue
	idx = 0
	for i in range(max_, 0, -1):
		for j in range(n):
			if l[j] > 0:
				l[j] -= 1
				ans[j + 1] += ans[j][idx]
			elif ans[j][idx] == 'a':
				ans[j + 1] += 'b'
			else:
				ans[j + 1] += 'a'
		idx += 1
	for h in ans:
		print(h)


import string

def letterExcept(key):
	for ele in string.ascii_lowercase:
		if ele != key:
			return ele
	else:
		raise Exception('No appropriate alphabet')

def solution():
	numOfStrings = int(input())
	requirements = list(map(lambda ele: int(ele), input().split(' ')))
	maxLen = max(requirements)
	if maxLen == 0:
		maxLen = 1
	res = [['a'] * maxLen]
	for i in range(numOfStrings):
		partRes = []
		ptr = 0
		for j in range(requirements[i]):
			partRes.append(res[i][ptr])
			ptr += 1
		if len(res[i]) > ptr:
			partRes.append(letterExcept(res[i][ptr]))
		if len(res[i]) > ptr + 1:
			partRes.extend([ele for ele in res[i][ptr + 1:]])
		res.append(partRes)
	return '\n'.join(map(lambda eles: ''.join(eles), res))
t = int(input())
for i in range(1, t + 1):
	res = solution()
	print(res)


from os import path
import sys
from heapq import heappush, heappop
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input().rstrip()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('a')
file = 1

def solve():
	for _ in range(ii()):
		n = ii()
		arr = li()
		if arr[0] > 0:
			s = 'r' * arr[0]
			res = [s, s]
		else:
			res = ['p', 'q']
		for i in range(1, n):
			x = arr[i]
			s1 = res[-1]
			if len(s1) < x:
				ok = 0
				s2 = res[-2]
				if len(s2) > len(s1) and s2[len(s1)] == 'z':
					ok = 1
				if ok == 0:
					s = s1 + 'z' * (x - len(s1))
					res[-1] = s
				else:
					s = s1 + 'y' * (x - len(s1))
					res[-1] = s
			elif x == 0:
				if s1[0] != 'z':
					s = 'z'
				else:
					s = 'y'
			else:
				s = s1[:x]
			res.append(s)
		for i in res:
			print(i)
if file:
	if path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	else:
		input = sys.stdin.readline
solve()


t = int(input())

def another(c):
	if c == 'a':
		return 'b'
	else:
		return 'a'
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split(' ')]
	s = ['a'] * 200
	print(''.join(s))
	for x in a:
		s[x] = another(s[x])
		print(''.join(s))


for itr in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	ans = ['a' * 200]
	flag = 0
	for i in arr:
		if ans[-1][i] == 'y':
			ans.append((ans[-1][:i] + 'x' + ans[0])[:199])
			flag = 0
		else:
			flag = 1
			ans.append((ans[-1][:i] + 'y' + ans[0])[:199])
	for i in ans:
		print(i)


tc = int(input())
for i in range(tc):
	n = int(input())
	arr = list(map(int, input().split()))
	stri = 'a' * 60
	print(stri)
	for i in range(len(arr)):
		temp = ''
		for j in range(0, 60):
			if j < arr[i]:
				temp += stri[j]
			elif stri[j] == 'a':
				temp += 'z'
			else:
				temp += 'a'
		stri = temp
		print(temp)


t = int(input().strip())
for i in range(t):
	n = int(input().strip())
	a = list(map(int, input().strip().split()))
	s = []
	tmp = 'a' * 150
	s.append(tmp)
	for i in range(1, n + 1):
		tmp = s[i - 1][0:a[i - 1]]
		tmp += chr((ord(s[i - 1][a[i - 1]]) - 97 + 1) % 26 + 97) * (150 - a[i - 1])
		s.append(tmp)
	for i in range(0, n + 1):
		print(s[i])


for i in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	w = 'a' * 50
	print(w)
	for j in a:
		w = w[:j] + w[j:].translate({97: 98, 98: 97})
		print(w)


def main():
	s = ['a'] * 52
	for _ in range(int(input())):
		n1 = int(input())
		l = list(map(int, input().split(' ')))
		print(''.join(s))
		for i in l:
			a = ord(s[i]) + 1
			if a >= 122:
				a = 97
			s[i] = chr(a)
			print(''.join(s))
main()


alphabet = list(map(chr, range(ord('a'), ord('z') + 1)))
for _ in range(int(input())):
	n = int(input())
	prev_str = 'a'
	prev_len = 1
	next_letter = 1
	for a in input().split():
		l = int(a)
		s = prev_str[:prev_len]
		if l > prev_len:
			s += alphabet[next_letter] * (l - prev_len)
			next_letter = (next_letter + 1) % 26
		if len(s) == 0:
			s = alphabet[next_letter]
			next_letter = (next_letter + 1) % 26
		print(s)
		prev_str = s
		prev_len = l
	if prev_len == 0:
		print(alphabet[next_letter])
	else:
		print(prev_str[:prev_len])


from sys import stdin, stdout
import math
input = stdin.readline

def print(x='', y='', end='\n'):
	if y == '':
		stdout.write(str(x) + end)
	else:
		stdout.write(str(x) + ' ' + str(y) + end)

def solve():
	n = int(input())
	l = list(map(int, input().split()))
	ans = [['a'] * (max(l) + 2)]
	m = max(l) + 2
	for i in range(1, n + 1):
		ans.append(ans[-1].copy())
		ans[i][l[i - 1]] = chr((ord(ans[i - 1][l[i - 1]]) + 1) % 26 + 97)
	for i in ans:
		print(''.join(i))
tt = 1
tt = int(input())
for __ in range(tt):
	solve()


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	a = list(map(int, input().split()))
	s = list('a' * 52)
	print(''.join(s))
	for i in range(n):
		if s[a[i]] == 'a':
			s[a[i]] = 'b'
		else:
			s[a[i]] = 'a'
		print(''.join(s))


def main():
	(n,) = map(int, input().split(' '))
	a = list(map(int, input().split(' ')))
	N = max(a) + 1
	c = 0
	A = 'a'
	s = A * N
	print(s)
	for i in range(n):
		c += 1
		s = s[:a[i]] + chr(ord(A) + c % 23) * (N - a[i])
		print(s)
for _ in range(int(input())):
	main()


rounds = int(input())
for i in range(rounds):
	n_array_size = int(input())
	n_array = input()
	n_array = n_array.split(' ')
	string = ['a'] * 200
	strings = [''.join(string)] * (len(n_array) + 1)
	print(strings[0])
	for index in range(len(n_array)):
		prefix_size = int(n_array[index])
		strings[index + 1] = strings[index]
		string_to_change = list(strings[index + 1])
		string_to_change[prefix_size] = chr((ord(string_to_change[prefix_size]) + 1 - 97) % 26 + 97)
		strings[index + 1] = ''.join(string_to_change)
		print(strings[index + 1])


import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n
avl = AvlTree()

class SegmentTree1:

	def __init__(self, data, default='z', func=lambda a, b: min(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater
for ik in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	a = ['' for i in range(len(l) + 1)]
	e = 99
	a[0] = 'a' * l[0] + 'b'
	print(a[0])
	for i in range(1, n + 1):
		a[i] = a[i - 1][:l[i - 1]] + chr(e) * 100
		e += 1
		if e > 122:
			e = 99
		print(a[i])


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if a[0] > 0:
		res = 'a' * a[0]
	else:
		res = 'a'
	print(res)
	prev = res
	prev_i = a[0]
	for i in range(0, n - 1):
		mx = max(a[i], a[i + 1])
		if a[i] == 0:
			z = ord(prev[0]) + 1
			if z > 122:
				z = z % 123 + 97
			if mx > 0:
				res = chr(z) * mx
			else:
				res = chr(z)
		elif prev_i > mx:
			z = ord(prev[a[i]]) + 1
			if z > 122:
				z = z % 123 + 97
			res = prev[:a[i]] + (mx - a[i]) * chr(z)
		else:
			if prev_i <= a[i]:
				x = a[i] - 1
			else:
				x = a[i]
			z = ord(prev[x]) + 1
			if z > 122:
				z = z % 123 + 97
			res = prev[:a[i]] + (mx - a[i]) * chr(z)
		print(res)
		prev = res
		prev_i = len(res)
	if a[n - 1] > 0:
		print(prev[:a[n - 1]])
	else:
		z = ord(prev[0]) + 1
		if z > 122:
			z = z % 123 + 97
		print(chr(z))


from collections import deque
from collections import OrderedDict
import math
import sys
import os
import threading
import bisect
import operator
import heapq
from atexit import register
from io import BytesIO
import io
input = lambda : sys.stdin.readline().rstrip('\r\n')
for t in range(int(input())):
	n = int(input())
	ar = [0] + list(map(int, input().split()))
	mLen = max(ar)
	lSrt = ['a'] * (mLen + 10)
	print(*lSrt[1::1], sep='')
	for i in range(1, n + 1):
		if lSrt[ar[i] + 1] == 'b':
			lSrt[ar[i] + 1] = 'c'
		else:
			lSrt[ar[i] + 1] = 'b'
		print(*lSrt[1::1], sep='')


def solve(A, n):
	a = max(A)
	ans = [''] * (n + 1)
	ans[0] = 'a' * (a + 1)
	for i in range(n):
		t = ans[i][A[i]]
		change = 'b' if t == 'a' else 'a'
		ans[i + 1] = ans[i][:A[i]] + change + ans[i][A[i] + 1:]
	return ans
for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	for i in solve(A, n):
		print(i)


t = int(input())
ans = []
for i in range(t):
	n = int(input())
	nums = list(map(int, input().split()))
	nums.append(0)
	cur_ans = ['a' * (max(nums) + 1)]
	for j in range(n):
		cur_ans.append(cur_ans[-1][:nums[j]] + chr((ord(cur_ans[-1][nums[j]]) - 96) % 26 + 97) + cur_ans[-1][nums[j] + 1:])
	ans.append(cur_ans)
for i in ans:
	for j in i:
		print(j)


for _ in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	s = list('a' * (max(lst) + 1))
	print(*s, sep='')
	for i in lst:
		if s[i] == 'a':
			s[i] = 'b'
		else:
			s[i] = 'a'
		print(*s, sep='')


from copy import copy
alph = 'qwertyuiopasdfghjklzxcvbnm' * 2
for _ in range(int(input())):
	n = int(input())
	a = [int(s) for s in input().split()]
	s = copy(alph)
	print(s)
	for i in range(n):
		tmp = s[:a[i]]
		tmp += alph[alph.index(s[a[i]]) + 1]
		tmp += alph[:26 * 2 - len(tmp)]
		s = tmp
		print(s)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	pre = 'b' * l[0]
	alpha = 'c'
	prelen = l[0]
	for i in range(n):
		if l[i] == 0:
			if prelen != 0:
				print(pre)
				if pre[0] == 'b':
					pre = 'c'
					alpha = 'b'
				else:
					pre = 'b'
					alpha = 'c'
				prelen = 1
			else:
				print('c')
				pre = 'b'
				prelen = 1
		elif l[i] <= prelen:
			print(pre)
			if l[i] != prelen:
				if pre[l[i]] == 'b':
					alpha = 'c'
				else:
					alpha = 'b'
			pre = pre[:l[i]]
			prelen = l[i]
		else:
			temp = pre + alpha * (l[i] - prelen)
			print(temp)
			pre = temp
			prelen = l[i]
			if alpha == 'b':
				alpha = 'c'
			else:
				alpha = 'b'
	print(pre)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = []
	t = 'abcdefghijklmnopqrstuvwxyz' * 7
	t = 'a' * 200
	s.append(t)
	c = 1
	for i in range(n):
		temp = list(s[i])
		temp[l[i]] = chr(ord('a') + c)
		c = (c + 1) % 25 + 1
		s.append(''.join(temp))
	for i in s:
		print(i)


from functools import lru_cache
from sys import stdin, stdout
import sys
from math import *
for __ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	a = []
	for i in range(26):
		a.append(chr(i + 97))
	l = ar[-1]
	ans = [''] * (n + 1)
	x = 0
	for i in range(max(max(ar), 1)):
		for j in range(n):
			if ar[j] != 0:
				ans[j] += a[x % 26]
				ar[j] -= 1
			elif ar[j] == 0:
				ans[j] += a[x % 26]
				ar[j] -= 1
				x += 1
	ans[-1] = ans[-2][:l]
	if ans[-1] == '':
		x += 1
		ans[-1] = a[x % 26]
	for i in ans:
		print(i)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	ll = 'a' * 100
	print(ll)
	for i in range(n):
		if ll[a[i]] == 'a':
			print(ll[:a[i]] + 'b' * (100 - a[i]))
			ll = ll[:a[i]] + 'b' * (100 - a[i])
		else:
			print(ll[:a[i]] + 'a' * (100 - a[i]))
			ll = ll[:a[i]] + 'a' * (100 - a[i])


for _ in range(int(input())):
	n = int(input())
	liStr = input().split()
	arr = []
	for i in liStr:
		arr.append(int(i))
	m = max(arr)
	if m == 0:
		ch = 'a'
		for i in range(0, n + 1):
			print(ch)
			if ch == 'a':
				ch = 'b'
			else:
				ch = 'a'
		continue
	ctr = 0
	liLast = []
	for i in range(0, m):
		print('a', end='')
		liLast.append('a')
	print()
	for i in arr:
		ctr = 0
		thisTime = []
		for j in range(0, m):
			if ctr < i:
				print(liLast[j], end='')
				thisTime.append(liLast[j])
			elif liLast[j] == 'a':
				print('b', end='')
				thisTime.append('b')
			else:
				print('a', end='')
				thisTime.append('a')
			ctr += 1
		print()
		liLast = thisTime


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	maxi = max(arr)
	if maxi == 0:
		maxi = 1
	string = 'a' * maxi
	print(string)
	for j in range(n):
		temp = ''
		if arr[j] != maxi:
			for k in range(arr[j], maxi):
				if string[k] == 'a':
					temp += 'b'
				else:
					temp += 'a'
		string = string[:arr[j]] + temp
		print(string)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = ['a' * (max(l) + 1)] * (n + 1)
	for (i, e) in enumerate(l):
		v = 'a' if s[i][e] == 'b' else 'b'
		s[i + 1] = s[i][:e] + v + s[i][e + 1:]
	print('\n'.join(s))


t = int(input())
for i in range(t):
	n = int(input())
	s = ['a' for i in range(200)]
	print(''.join(s))
	l = [int(x) for x in input().split()]
	s1 = ''.join(s)
	for i in range(n):
		x = l[i]
		ans = []
		for i in range(x):
			ans.append(s1[i])
		for i in range(x, 200):
			if ord(s1[i]) != 122:
				ans.append(chr(ord(s1[i]) + 1))
			else:
				ans.append(chr(ord(s1[i]) - 1))
		print(''.join(ans))
		s1 = ''.join(ans)


def next(char):
	pos = (ord(char) - ord('a') + 1) % 26
	return chr(ord('a') + pos)
t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	prev = 'a' * 51
	print(prev)
	for prefix in A:
		string = prev[:prefix] + next(prev[prefix])
		string = string + 'a' * (51 - len(string))
		print(string)
		prev = string


from sys import stdin, stdout
from collections import Counter
from itertools import permutations
import bisect
I = lambda : map(int, stdin.readline().split())
I1 = lambda : stdin.readline()
t = int(I1())
for _ in range(t):
	s = 'a' * 200
	(n, a) = (int(I1()), list(I()))
	print(s)
	for x in a:
		if s[x] == 'a':
			ch = 'b'
		else:
			ch = 'a'
		s = s[:x] + ch + s[x + 1:]
		print(s)


t = int(input())
for g in range(0, t):
	n = int(input())
	a = list(map(int, input().split()))
	if max(a) == 0:
		s = 'a'
	else:
		s = 'a' * max(a)
	print(s)
	s = list(s)
	for i in range(0, n):
		if a[i] == 0:
			if s[0] == 'z':
				s[0] = 'a'
			else:
				s[0] = 'z'
			for j in range(0, max(max(a), 1)):
				print(s[j], end='')
			print('')
		elif a[i] == max(a):
			for j in range(0, max(a)):
				print(s[j], end='')
			print('')
		else:
			if s[a[i]] == 'z':
				s[a[i]] = 'a'
			else:
				s[a[i]] = 'z'
			for j in range(0, max(a)):
				print(s[j], end='')
			print('')


import math as mt
import sys, string
input = sys.stdin.readline
print = sys.stdout.write
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
from collections import defaultdict
w = 'abcdefghijklmnopqrstuvwxyz'
p = 0
t = I()
for _ in range(t):
	n = I()
	l = L()
	x = ['a'] * 200
	for i in range(200):
		print(x[i])
	print('\n')
	for i in range(n):
		for j in range(l[i]):
			print(x[j])
		w = chr((ord(x[l[i]]) - ord('a') + 1) % 26 + 97)
		print(w)
		x[l[i]] = w
		for j in range(l[i] + 1, len(x)):
			print(x[j])
		print('\n')


m = int(input())
for i in range(m):
	n = int(input())
	a = list(map(int, input().split()))
	s = 'abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyz'
	t = s[::-1]
	k = 0
	print(s)
	for i in range(n):
		s1 = s[:a[i]] + t[k] + s[a[i]:]
		if t[k] == s[a[i]]:
			s1 = s[:a[i]] + t[k - 2] + s[a[i]:]
		print(s1)
		s = s1
		k += 1
		k = k % 50


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	abc = [chr(i) for i in range(97, 97 + 26)]
	ans = 'a' * (a[0] + 1)
	print(ans)
	for i in range(0, n - 1):
		ans = ans[:a[i]] + abc[(abc.index(ans[a[i]]) + 1) % 26] * max(0, a[i + 1] - a[i] + 1)
		print(ans)
	ans = ans[:a[n - 1]] + abc[(abc.index(ans[a[n - 1]]) + 1) % 26]
	print(ans)


import random
n = int(input())
ans = []

def change(s):
	if s == 'a':
		return 'b'
	return 'a'
for i in range(n):
	size = int(input())
	lst = list(map(int, input().split(' ')))
	k = ['a'] * 60
	print(''.join(k))
	for i in lst:
		k[i] = change(k[i])
		print(''.join(k))
for i in ans:
	print(i)


for __ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	ans = 'a' * 100
	print(ans)
	for i in range(n):
		ans1 = ''
		j = -1
		for j in range(ar[i]):
			ans1 += ans[j]
		if ans[j + 1] == 'a':
			ans1 += 'b' * (100 - ar[i])
		else:
			ans1 += 'a' * (100 - ar[i])
		print(ans1)
		ans = ans1


for h in range(int(input())):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	maxi = max(arr)
	ans = ['a' * (maxi + 1)]
	if maxi == 0:
		ans = ['xy' if i % 2 == 0 else 'yx' for i in range(n)]
		ans.append('ll')
	else:
		for i in arr:
			ans.append(ans[-1][:i] + chr((ord(ans[-1][i]) - ord('a') + 1) % 25 + ord('a')) + ans[-1][i + 1:])
	for i in ans:
		print(i)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	st = ['' for i in range(n + 1)]
	st[0] = 'a' * 100
	for i in range(1, n + 1):
		st[i] = st[i - 1][:a[i - 1]] + chr(97 + (ord(st[i - 1][a[i - 1]]) + 1) % 26) * (100 - a[i - 1])
	for i in st:
		print(i)


import string
import random

def Solve(arr):
	s = ''
	pre = ''
	d = 0
	k = ''
	for _ in range(55):
		s += random.choice(string.ascii_lowercase)
	pre = s
	print(pre)
	for i in range(len(arr)):
		s = pre[:arr[i]]
		d = 55 - len(s)
		j = arr[i]
		while j < len(pre):
			k = random.choice(string.ascii_lowercase)
			if k != pre[j]:
				s += k
				j += 1
		print(s)
		pre = s
T = int(input())
for _ in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	Solve(arr)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = []
	num = 97
	s.append('a' * 51)
	for i in range(1, n + 1):
		if s[i - 1][a[i - 1]] == 'z':
			num = 97
		else:
			num = ord(s[i - 1][a[i - 1]]) + 1
		s.append(s[i - 1][:a[i - 1]] + chr(num) * (51 - a[i - 1]))
	for i in s:
		print(i)


t = int(input())
while t:
	n = int(input())
	l = list(map(int, input().split()))
	st = []
	x = 97
	for (i, v) in enumerate(l):
		if i == 0:
			v = v or 1
			st.append('a' * v)
		elif l[i - 1] == 0:
			x += 1
			if x > 122:
				x = 98
			v = v or 1
			st.append(chr(x) * v)
		elif v < l[i - 1]:
			st.append(st[i - 1][:l[i - 1]])
		else:
			x += 1
			if x > 122:
				x = 99
			st.append(st[i - 1][:l[i - 1]] + chr(x) * max(0, v - l[i - 1]))
	if l[-1] == 0:
		x += 1
		if x > 122:
			x = 98
		st.append(chr(x))
	else:
		st.append(st[-1][:l[-1] or 1])
	print('\n'.join(st))
	t -= 1


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = ['a'] * 51
	print(''.join(s))
	for i in l:
		s1 = ord(s[i]) + 1
		if s1 >= 122:
			s1 = 97
		s[i] = chr(s1)
		print(''.join(s))


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	max_n = max(arr)
	arr = [max_n + 1] + arr
	s = 'a' * (max_n + 1)
	print(s)
	for i in range(n):
		if ord(s[arr[i + 1]]) == 122:
			c = 'a'
		else:
			c = chr(ord(s[arr[i + 1]]) + 1)
		s = s[:arr[i + 1]] + c + s[arr[i + 1] + 1:]
		print(s)


for t in range(int(input())):
	n = int(input())
	x = list(map(int, input().split()))
	st = 'ab' * 50
	pas = 'qwertyuioplkjhgfdszxcvnm'
	current = ''
	past = st
	index = 0
	print(st)
	for i in range(n):
		index %= 20
		current = past[:x[i]]
		for i in range(100 - x[i]):
			current += pas[index]
		index += 1
		print(current)
		past = current


t = int(input())
for _ in range(t):
	init = ['a'] * 110
	n = int(input())
	nums = list(map(int, input().split()))
	print(''.join(init))
	for i in nums:
		new_chr = ord(init[i]) + 1
		if new_chr == 122:
			new_chr = 97
		init[i] = chr(new_chr)
		print(''.join(init))


def func(A):
	res = ['abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz']
	for i in A:
		n = ''
		n = res[-1][:i]
		n += res[-1][i + 1:]
		n += res[-1][i]
		res.append(n)
	return res
t = int(input())
for i in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	res = func(A)
	for i in res:
		print(i)


import functools
import heapq
import os
import random
import sys
from collections import deque
import io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
TC = int(input())
ord_a = ord('a')
for tc in range(TC):
	N = int(input())
	A = list(map(int, input().split()))
	R = []
	s_len = max(A) + 1
	t = [0 for _ in range(s_len)]
	R.append(t.copy())
	for a in A:
		t[a] = (t[a] + 1) % 26
		R.append(t.copy())
	for r in R:
		print(''.join(map(lambda x: chr(x + ord_a), r)))


s = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
s1 = s[0:100]
s2 = list(s1)
t = int(input())
for i in range(t):
	n = int(input())
	alist = [int(x) for x in input().split()]
	print(''.join(s2))
	for j in range(n):
		a = alist[j]
		if s2[a] == 'a':
			s2[a] = 'b'
		else:
			s2[a] = 'a'
		print(''.join(s2))
	s2 = list(s1)


for _ in range(int(input())):
	n = int(input())
	ls = list(map(int, input().split()))
	s = 'a' * max(max(ls), 1)
	ch = ''
	c = 98
	print(s)
	for i in range(n - 1):
		if ls[i] == 0:
			c += 1
			if c > 122:
				c = 97
			s = chr(c) * max(ls[i + 1], 1)
			print(s)
		else:
			print(s[:ls[i]], end='')
			ch = s[:ls[i]]
			if i > 0:
				if ls[i - 1] > ls[i] and ls[i + 1] > ls[i]:
					c += 1
					if c > 122:
						c = 97
			if ls[i + 1] > ls[i]:
				print(chr(c) * (ls[i + 1] - ls[i]), end='')
				ch += chr(c) * (ls[i + 1] - ls[i])
			s = ch
			print('')
	if ls[n - 1] == 0:
		c += 1
		if c > 122:
			c = 97
		s = chr(c)
		print(chr(c))
	else:
		print(s[:ls[n - 1]])


t = int(input())
for i in range(t):
	n = int(input())
	s = 'a' * 51
	di = dict()
	di['a'] = 'b'
	di['b'] = 'a'
	prev = s
	print(s)
	ll = list(map(int, input().split()))
	for k in ll:
		prev = prev[0:k] + di[prev[k]] + prev[k + 1:]
		print(prev)


for _ in range(int(input())):
	n = int(input())
	lst = [int(i) for i in input().split()]
	result = ['a'] * 52
	print(''.join(result))
	for i in range(n):
		if result[lst[i]] == 'a':
			result[lst[i]] = 'b'
		else:
			result[lst[i]] = 'a'
		print(''.join(result))


def solve(n, a):
	s = ['a']
	s[0] += 'a' * (a[0] - 1)
	i = 0
	N = n
	while n > 0:
		if a[i] > len(s[-1]):
			print('yuhu')
		else:
			if s[-1][0] == 'a':
				char = 'b'
			else:
				char = 'a'
			x = s[-1][:a[i]]
			if not x:
				x = char
			if len(s[-1]) > a[i]:
				if s[-1][a[i]] == 'a':
					char = 'b'
				else:
					char = 'a'
			if i + 1 < N:
				if a[i + 1] > len(x):
					x += char * (a[i + 1] - len(x))
			s.append(x)
		i += 1
		n -= 1
	for ss in s:
		print(ss)
t = int(input())
for _ in range(t):
	inp = input().split()
	n = int(inp[0])
	a = [int(x) for x in input().split()]
	solve(n, a)


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	curchar = 0
	s = chr(curchar + 97) * 200
	print(s)
	for i in a:
		curchar = (curchar + 1) % 26
		if s[i] == chr(curchar + 97):
			curchar = (curchar + 1) % 26
		t = s[:i] + chr(curchar + 97) * (200 - i)
		print(t)
		s = t


test = int(input())

def notthis(s):
	if s == 'a':
		s = 'b'
	else:
		s = 'a'
	return s
for q in range(test):
	n = int(input())
	x = list(map(int, input().split()))
	b = max(x) + 5
	s1 = 'a' * b
	prev = 'a' * b
	print(s1)
	for i in range(n):
		if x[i] == 0:
			if s1[0] == 'a':
				s = list(s1)
				s[0] = 'b'
				s1 = ''.join(s)
			else:
				s = list(s1)
				s[0] = 'a'
				s1 = ''.join(s)
		else:
			s1 = s1[0:x[i]]
			for j in range(x[i], b):
				s1 += notthis(prev[j])
		print(s1)
		prev = s1


for t in range(int(input())):
	n = int(input())
	n1 = map(int, input().split())
	N = list(n1)
	n2 = [N[0]]
	n2.extend(N)
	Max = max(n2) + 2
	c = []
	for _ in range(Max):
		c.append('a')
	print(''.join(c))
	for i in range(n):
		if c[n2[i + 1]] == 'a':
			c[n2[i + 1]] = 'b'
		else:
			c[n2[i + 1]] = 'a'
		print(''.join(c))


import sys
input = sys.stdin.readline
t = int(input())
while t > 0:
	n = int(input())
	arr = list(map(int, input().split()))
	mx = max(arr)
	ans = ['a' * (mx + 1)] * (n + 1)
	for (i, x) in enumerate(arr):
		tag = 'a' if ans[i][x] == 'b' else 'b'
		ans[i + 1] = ans[i][:x] + tag + ans[i][x + 1:]
	print('\n'.join(ans))
	t -= 1


t = int(input())
for i in range(0, t):
	n = int(input())
	l = list(map(int, input().split()))
	ans = []
	s = 'a' * 200
	ans.append(s)
	last = s
	for j in range(0, n):
		x = l[j]
		y = last[0:x]
		for k in range(x, 200):
			if ord(last[k]) + 1 > 122:
				y = y + chr(97)
			else:
				y = y + chr(ord(last[k]) + 1)
		ans.append(y)
		last = y
	for j in range(0, n + 1):
		print(ans[j])


for _ in range(int(input())):
	__ = input()
	lcp = list(map(int, input().split()))
	s = ['a'] * 200
	print(''.join(s))
	for pref in lcp:
		s_new = s[0:pref]
		nex = chr(ord(s[pref]) + 1)
		if nex == '{':
			nex = 'a'
		s_new.extend([nex] * 200)
		s_new = s_new[:200]
		print(''.join(s_new))
		s = s_new


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nsmallest
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
from decimal import Decimal
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(var, end='\n'):
	sys.stdout.write(str(var) + end)

def outa(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
for _ in range(int(data())):
	n = int(data())
	arr = l()
	first = 'a' * 50
	out(first)
	for i in range(n):
		j = 0
		new = ''
		while j < 50:
			if arr[i]:
				new += first[j]
				arr[i] -= 1
			else:
				new += chr((ord(first[j]) - 96) % 26 + 97)
			j += 1
		out(new)
		first = new


for _ in range(int(input())):
	n = int(input())
	l = [int(p) for p in input().split()]
	d = ['a'] * 52
	str1 = ''.join((str(e) for e in d))
	print(str1)
	for i in l:
		x = ord(d[i])
		if x == 122:
			x = 98
		d[i] = chr(x + 1)
		str1 = ''.join((str(e) for e in d))
		print(str1)


import sys, math
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	l.append(math.inf)
	ans = ['a' * max(l[0], 1)]
	for i in range(n):
		if l[i] == 0:
			x = chr(ord('a') + (ord(ans[i][-1]) - ord('a') + 1) % 26)
			if i != n - 1:
				ans.append(x * max(l[i], l[i + 1], 1))
			else:
				ans.append(x)
		elif l[i] >= l[i + 1]:
			s1 = ans[i][:l[i]]
			ans.append(s1)
		else:
			s1 = ans[i][:l[i]]
			s2 = ''
			if i != n - 1:
				x = chr(ord('a') + (ord(ans[i][-1]) - ord('a') + 1) % 26)
				s2 = x * (l[i + 1] - l[i])
			ans.append(s1 + s2)
	for i in ans:
		print(i)


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('../output.txt', 'w')
except:
	pass
for _ in range(int(input())):
	n = int(input())
	a = L()
	p = 'a' * 200
	print(p)
	for i in a:
		c = p[:i] + ('x' if p[i] == 'z' else 'z') + 'a' * (199 - len(p[:i]))
		print(c)
		p = c


for i in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split(' ', n - 1)]
	s = 'abcdefghijklmnopqrstuvwxyz'
	m = max(a)
	res = 'a' * (m + 1)
	print(res)
	i = 1
	for each in a:
		if i >= 26:
			i = i % 26 + 1
		res = res[:each] + s[i] * (m + 1 - each)
		print(res)
		i += 1


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	b = max(a) + 2
	c = ['a' * b]
	x = ['x', 'y']
	for i in range(n):
		for j in x:
			if j != c[-1][a[i]]:
				y = j
				break
		c.append(c[-1][:a[i]] + y + 'a' * (b - a[i] - 1))
	for i in range(len(c)):
		print(c[i])


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	arr = ['a'] * 52
	print(''.join(arr))
	for i in range(n):
		if arr[a[i]] == 'a':
			arr[a[i]] = 'b'
		else:
			arr[a[i]] = 'a'
		print(''.join(arr))


import math
import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input().strip()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
for _ in range(inp()):
	s = []
	n = inp()
	l = inlt()
	cnt = 0
	s.append(chr(97 + cnt % 25) * 201)
	cnt += 1
	for i in range(n):
		temp = s[-1][:l[i]] + chr((ord(s[-1][l[i]]) + 1 - 97) % 26 + 97) * 201
		cnt += 1
		s.append(temp)
	for i in range(n + 1):
		print(s[i][:200])


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = []
	s1 = ''
	for i in range(51):
		s1 += chr(97)
	k = 0
	s.append(s1)
	for i in range(n):
		s1 = ''
		for j in range(51):
			if j == l[i]:
				k = ord(s[i][j]) - 97
				k += 1
				k = k % 26
				s1 += chr(97 + k)
			else:
				s1 += str(s[i][j])
		s.append(s1)
	for i in range(n + 1):
		print(s[i])


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]
for _ in range(II()):
	n = II()
	aa = LI()
	cur = ['a'] * 60
	print(''.join(cur))
	for a in aa:
		if cur[a] == 'a':
			cur[a] = 'b'
		else:
			cur[a] = 'a'
		print(''.join(cur))


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().rstrip().split()))
	s1 = ''.join(['a'] * 51)
	srs = [s1]
	for i in range(n):
		temp = srs[-1][:a[i]]
		rm = 51 - a[i]
		if srs[-1][a[i]] == 'a':
			ad = ''.join(['b'] * rm)
		else:
			ad = ''.join(['a'] * rm)
		temp = temp + ad
		srs.append(temp)
	for i in srs:
		print(i)


for t in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	c = 97
	s = ''
	ans = [''] * (n + 1)
	for i in range(1, n + 1):
		if ans[i - 1] == '':
			while l[i - 1]:
				if c > 122:
					c = 97
				ans[i] = ans[i] + chr(c)
				ans[i - 1] = ans[i - 1] + chr(c)
				c = c + 1
				l[i - 1] = l[i - 1] - 1
		elif l[i - 1] <= len(ans[i - 1]):
			ans[i] = ans[i] + ans[i - 1][:l[i - 1]]
		else:
			ans[i] = ans[i] + ans[i - 1][:l[i - 1]]
			z = l[i - 1] - len(ans[i - 1])
			while z:
				if c > 122:
					c = 97
				ans[i] = ans[i] + chr(c)
				ans[i - 1] = ans[i - 1] + chr(c)
				c = c + 1
				z = z - 1
	c = c + 1
	for i in ans:
		if i == '':
			if c > 122:
				c = 97
			print(chr(c))
			c = c + 1
		else:
			print(i)


from sys import stdin
from math import ceil
inp = lambda : stdin.readline().strip()
t = int(inp())
for _ in range(t):
	n = int(inp())
	a = [int(x) for x in inp().split()]
	ans = []
	s = ['a'] * 51
	ans.append(s[:])
	for i in a:
		if s[i] == 'z':
			s[i] = 'a'
		else:
			s[i] = chr(ord(s[i]) + 1)
		ans.append(s[:])
	for i in range(n + 1):
		print(''.join(ans[i]))


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
testcases = int(input())
for j in range(testcases):
	n = int(input())
	vals = list(map(int, input().split()))
	outy = []
	cv = 0
	val1 = [0 for b in range(50)]
	outy.append(val1)
	cv += 1
	for s in range(n):
		val1 = [cv for b in range(50)]
		for b in range(vals[s]):
			val1[b] = outy[-1][b]
		if vals[s] != 50:
			cv += 1
			cv = cv % 26
		outy.append(val1)
	for s in range(len(outy)):
		outy[s] = [chr(k + 97) for k in outy[s]]
		outy[s] = ''.join(outy[s])
	for s in range(len(outy)):
		print(outy[s])


for test in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	ans = ['a' * 200]
	for i in range(n):
		tt = ans[i][:a[i]] + 'b' + ans[i][a[i] + 1:]
		if a[i] < 200:
			if ans[i][a[i]] == 'b':
				tt = ans[i][:a[i]] + 'c' + ans[i][a[i] + 1:]
		tt = tt[:200]
		ans.append(tt)
	for i in ans:
		print(i)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	kk = [''] * n
	m = max(l)
	kk[n - 1] = 'a' * 100
	pp = n - 2
	for i in range(n - 2, -1, -1):
		e = l[i]
		c = ord(kk[pp + 1][e])
		if c != 122:
			kk[pp] = kk[pp + 1][:e] + chr(c + 1) * (100 - e)
		else:
			c = 96
			kk[pp] = kk[pp + 1][:e] + chr(c + 1) * (100 - e)
		pp -= 1
	c = ord(kk[n - 1][l[n - 1]])
	if c != 122:
		kk.append(kk[n - 1][:l[n - 1]] + chr(c + 1) * (100 - l[n - 1]))
	else:
		c = 96
		kk.append(kk[n - 1][:l[n - 1]] + chr(c + 1) * (100 - l[n - 1]))
	for e in kk:
		print(e)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	s = ''
	for i in range(26):
		s += chr(97 + i)
	s += s
	ans = []
	ans.append(s)
	for i in range(n):
		s = list(s)
		s[arr[i]] = chr((ord(ans[-1][arr[i]]) - 97 + 1) % 26 + 97)
		ans.append(''.join(s))
	for i in ans:
		print(i)


from collections import deque
for _ in range(int(input())):
	n = int(input())
	a = [int(_) for _ in input().split()]
	s = list('a' * 110)
	print(''.join(s))
	for item in a:
		if s[item] == 'a':
			s[item] = 'b'
		else:
			s[item] = 'a'
		print(''.join(s))


import random
alpha = 'abcdefghijklmnopqrstuvwxyz'
for _ in range(int(input())):
	p = int(input())
	b = list((int(x) for x in input().split()))
	s = ''.join((random.choice(list(alpha)) for j in range(max(b) + 1)))
	print(s)
	for i in b:
		z = alpha.replace(s[i], '')
		t = s[:i] + str(''.join((random.choice(list(z)) for k in range(max(b) + 1 - i))))
		s = t
		print(s)


t = int(input())
for i in range(0, t):
	n = int(input())
	arr = list(map(int, input().split()))
	b = 'a' * 200
	print(b)
	for j in arr:
		b = list(b)
		if b[j] == 'a':
			b[j] = 'b'
		else:
			b[j] = 'a'
		print(''.join(b))


def solve():
	n = int(input())
	l = [int(x) for x in input().split()]
	c = max(l)
	s = ['a' * (c + 1)] * (n + 1)
	for i in range(n):
		e = l[i]
		d = 'a' if s[i][e] == 'b' else 'b'
		s[i + 1] = s[i][:e] + d + s[i][e + 1:]
	print('\n'.join(s))
for _ in range(int(input())):
	solve()


import os
import sys
import math
import heapq
from decimal import *
from io import BytesIO, IOBase
from collections import defaultdict, deque

def r():
	return int(input())

def rm():
	return map(int, input().split())

def rl():
	return list(map(int, input().split()))
for _ in range(r()):
	n = r()
	a = rl()
	t = [chr(97 + i) for i in range(26)]
	s = t * 7
	for i in s:
		print(i, end='')
	print()
	for (j, i) in enumerate(a):
		rem = 1 if s[i] == s[i + 1] else 0
		s = s[:i] + s[i + 1 + rem:]
		for i in s:
			print(i, end='')
		print(flush=True)


def mirror(x):
	r = ''
	for x in x:
		r += 'a' if x == 'b' else 'b'
	return r
res = ''
for _ in range(int(input())):
	input()
	a = [int(x) for x in input().split()]
	r = 'a' * 50
	res += r + '\n'
	for row in a:
		r = r[:row] + mirror(r[row:])
		res += f'{r}\n'
print(res)


import math
import collections
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect_left as bsl
from bisect import bisect_right as bsr
import heapq as hq
setrecursionlimit(2 ** 20)
t = 1
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().rstrip().split()))
	s = 'a'
	for i in range(51):
		s += 'a'
	print(s)
	for i in range(n):
		ss = ''
		j = 0
		while j < a[i]:
			ss += s[j]
			j += 1
		if s[j] == 'a':
			while j < 51:
				ss += 'b'
				j += 1
		else:
			while j < 51:
				ss += 'a'
				j += 1
		s = ss[:]
		print(ss)


def modinv(n, p):
	return pow(n, p - 2, p)

def main():
	h = 200
	for case in range(int(input())):
		n = int(input())
		a = [int(x) for x in input().split()]
		s = ['a' * h]
		for i in range(n):
			s1 = s[i]
			s2 = s[i][:a[i]]
			if len(s2) < h:
				if s1[a[i]] == 'a':
					s2 += 'b' * (h - a[i])
				else:
					s2 += 'a' * (h - a[i])
			s.append(s2)
		for x in s:
			print(x)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	l = 97
	m = max(a)
	m = max(2, m)
	s = 'a' * max(m, 2)
	ans = [s]
	for i in range(n):
		num = a[i]
		prev = list(ans[-1])
		if num != m:
			prev[num] = chr((ord(prev[num]) - l + 1) % 26 + l)
		ans.append(''.join(prev))
	for i in ans:
		print(i)


for t in range(int(input())):
	n = int(input())
	ali = [int(k) for k in input().split()]
	start = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwx' * 200
	if ali[0] == 0:
		nowind = 1
		fli = [start[:nowind]]
	else:
		nowind = ali[0]
		fli = [start[:nowind]]
	for i in range(n - 1):
		if ali[i] == 0:
			fli.append(start[nowind:nowind + max(1, ali[i + 1] - ali[i])])
			nowind += max(1, ali[i + 1] - ali[i])
		else:
			fli.append(fli[i][:ali[i]])
			if ali[i + 1] > ali[i]:
				fli[i + 1] += start[nowind:nowind + ali[i + 1] - ali[i]]
				nowind += ali[i + 1] - ali[i]
	if ali[-1] == 0:
		fli.append(start[nowind:nowind + 1])
	else:
		fli.append(fli[-1][:ali[-1]])
	for ele in fli:
		print(ele)


def lmi():
	return list(map(int, input().split()))

def ii():
	return int(input())
t = int(input())
for _ in range(t):
	n = int(input())
	Ss = lmi()
	m = max(Ss) + 2
	print('a' * m)
	s = 'a' * m
	for i in range(n):
		if s[Ss[i]] == 'a':
			s = s[:Ss[i]] + 'b' + s[Ss[i] + 1:]
		else:
			s = s[:Ss[i]] + 'a' + s[Ss[i] + 1:]
		print(s)


t = int(input())
for i in range(t):
	n = int(input())
	common = [int(j) for j in input().split()]
	chars = []
	for j in range(n + 1):
		chars.append(['a' for k in range(51)])
	for j in range(n):
		for k in range(common[j]):
			chars[j + 1][k] = chars[j][k]
		if chars[j][common[j]] == 'z':
			chars[j + 1][common[j]] = 'a'
		else:
			chars[j + 1][common[j]] = 'z'
	for j in chars:
		for k in j:
			print(k, end='')
		print()


def getNext(c):
	ans = chr(ord(c) + 1) if c != 'z' else 'a'
	return ans
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(lambda x: int(x), input().split()))
	prv: str = 'a' * max(arr[0], 1)
	print(prv)
	for j in range(1, n):
		prvMatchLen = arr[j - 1]
		nextMatchLen = arr[j]
		present = prv[:prvMatchLen]
		if nextMatchLen > prvMatchLen:
			if len(prv) > prvMatchLen:
				present = present + getNext(prv[prvMatchLen]) + 'a' * (nextMatchLen - prvMatchLen - 1)
			else:
				present = present + 'a' * (nextMatchLen - prvMatchLen)
		present = present if len(present) > 0 else getNext(prv[0])
		print(present)
		prv = present
	last = prv[0:arr[n - 1]]
	last = last if len(last) > 0 else getNext(prv[0])
	print(last)


from collections import Counter
from collections import OrderedDict

def SOCountR(mylist):
	return OrderedDict(sorted(Counter(mylist).items(), reverse=True))

def SOCount(mylist):
	return OrderedDict(sorted(Counter(mylist).items()))

def freq_count(mylist):
	return Counter(mylist)
t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	high = max(arr)
	val = ord('a')
	last = []
	for each in range(high):
		print(chr(val), end='')
		last.append(chr(val))
	if high != 0:
		print()
		for (j, each) in enumerate(arr):
			nlast = []
			for i in range(each):
				print(last[i], end='')
				nlast.append(last[i])
			for i in range(each, high):
				val = ord(last[i]) + 1
				if val > ord('z'):
					val = ord('a')
				print(chr(val), end='')
				nlast.append(chr(val))
			last = nlast
			print()
	else:
		for i in range(n):
			val += 1
			print(chr(val))
			if val > ord('z'):
				val = ord('c')
			continue
	if high == 0:
		val += 1
		print(chr(val))
		if val > ord('z'):
			val = ord('c')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	s = 'a' * 60
	print(s)
	for j in a:
		if s[j] == 'a':
			s = s[:j] + 'b' + 'a' * (59 - j)
		else:
			s = s[:j] + 'a' * (60 - j)
		print(s)


from sys import stdin, stdout
cin = stdin.readline
cout = stdout.write
mp = lambda : list(map(int, cin().split()))

def chars():
	s = cin()
	return list(s[:len(s) - 1])

def pl(a):
	for val in a:
		cout(val + '\n')
(t,) = mp()
for _ in range(t):
	(n,) = mp()
	a = mp()
	l = [''] * (n + 1)
	l[0] += 'a' * 51
	for i in range(1, n + 1):
		x = ''
		if l[i - 1][a[i - 1]] == 'a':
			x += 'b'
		else:
			x += 'a'
		l[i] += l[i - 1][:a[i - 1]] + x + l[i - 1][a[i - 1] + 1:]
	pl(l)


import io, os
R = lambda : map(int, input().split())
for _ in range(int(input())):
	n = int(input())
	a = list(R())
	s = [''] * (n + 1)
	cnt = 0
	s[0] = 'a' * a[0]
	if len(s[0]) == 0:
		s[0] = chr(ord('a') + cnt % 26)
		cnt += 1
	for i in range(1, n):
		s[i] = s[i - 1][:a[i - 1]]
		if a[i] > a[i - 1]:
			cnt += 1
			s[i] += chr(ord('a') + cnt % 26) * (a[i] - a[i - 1])
		if len(s[i]) == 0:
			cnt += 1
			s[i] = chr(ord('a') + cnt % 26)
	s[n] = s[n - 1][:a[n - 1]]
	if len(s[n]) == 0:
		cnt += 1
		s[n] = chr(ord('a') + cnt % 26)
	for i in s:
		print(i)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	l = max(a) + 10
	ans = ['a' * l]
	for i in a:
		temp = ans[-1][:i] + chr((ord(ans[-1][i]) - 96) % 26 + 97) + ans[-1][i + 1:]
		ans.append(temp)
	print('\n'.join(ans))


t = int(input())
for x in range(t):
	n = int(input())
	l1 = [int(x) for x in input().split()]
	l2 = []
	alfie = 'abcdefghijklmnopqrstuvwxyz'
	i = 0
	maxlength = max(l1) + 1
	prev = 'a' * maxlength
	print(prev)
	while i < len(l1):
		targ = l1[i]
		prev = prev[:targ] + alfie[(alfie.index(prev[targ]) + 7) % 26] * (len(prev) - targ)
		print(prev)
		i += 1


for aww in range(int(input())):
	aa = input()
	a = [*map(int, input().split())]
	b = ['a'] * 52
	c = []
	d = 98
	for i in range(len(a)):
		print(''.join(b))
		b[a[i]] = chr(d)
		d += 1
		if d >= 97 + 24:
			d = 98
	print(''.join(b))


for _ in range(int(input())):
	n = int(input())
	x = list(map(int, input().split()))
	b = max(x)
	if b == 0:
		for i in range(n + 1):
			if i % 2 == 0:
				print('a')
			else:
				print('b')
		continue
	s = 'a' * max(x)
	print(s)
	for i in range(n):
		if x[i] != b:
			if s[x[i]] == 'a':
				s = s[:x[i]] + 'b' + s[x[i] + 1:]
			else:
				s = s[:x[i]] + 'a' + s[x[i] + 1:]
		print(s)


t = int(input())
for _ in range(t):
	n = int(input())
	l = [int(i) for i in input().split()]
	ch = 'a'
	if l[0] == 0:
		print(ch)
		pre = ''
	else:
		print(ch * l[0])
		pre = ch * l[0]
	for i in range(0, n - 1):
		if l[i] >= l[i + 1] and l[i] == 0 and (l[i + 1] == 0):
			if ch == 'z':
				ch = 'a'
			else:
				y = ord(ch) + 1
				ch = chr(y)
			print(ch)
			pre = ''
		elif l[i] >= l[i + 1]:
			pre = pre[0:l[i]]
			print(pre)
		else:
			if ch == 'z':
				ch = 'a'
			x = l[i + 1] - l[i]
			pre = pre[0:l[i]]
			print(pre, end='')
			y = ord(ch) + 1
			ch = chr(y)
			print(ch * x)
			pre = pre + ch * x
	if l[n - 1] == 0:
		if ch == 'z':
			ch = 'a'
		else:
			y = ord(ch) + 1
			ch = chr(y)
		print(ch)
	else:
		print(pre[0:l[n - 1]])


def listtostring(L):
	t = ''
	for i in range(0, len(L)):
		t += L[i]
	return t
t = int(input())
for i in range(0, t):
	n = int(input())
	L = list(map(int, input().split()))
	if max(L) == 0:
		print('a')
		for i in range(0, n):
			print(chr(97 + (i + 1) % 26))
	else:
		M = ['a' for j in range(1 + max(L))]
		print(listtostring(M))
		k = 0
		for i in range(0, n):
			if M[L[i]] == 'a':
				M[L[i]] = 'b'
			else:
				M[L[i]] = 'a'
			print(listtostring(M))


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	a = [int(i) for i in stdin.readline().split(' ')]
	s = ['a' * (max(a) + 1)] * (n + 1)
	for i in range(len(a)):
		temp = 'a' if s[i][a[i]] == 'b' else 'b'
		s[i + 1] = s[i][:a[i]] + temp + s[i][a[i] + 1:]
	print('\n'.join(s))


def hhh(s):
	u = list(s)
	for i in range(len(s)):
		if u[i] == 'a':
			u[i] = 'b'
		else:
			u[i] = 'a'
	return ''.join(u)
for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = 'a' * 50
	print(b)
	for i in range(n):
		v = b[:a[i]] + hhh(b[a[i]:])
		print(v)
		b = v


def fun(s):
	if s == 'a':
		return 'b'
	else:
		return 'a'
t = int(input())
for testcase in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	m = max(l)
	ans = ['a' * (m + 1)]
	for i in range(n):
		k = fun(ans[i][l[i]])
		s = ans[i][:l[i]] + k + ans[i][l[i] + 1:]
		ans.append(s)
	for x in ans:
		print(x)


for _ in range(int(input())):
	n = int(input())
	a = [*map(int, input().split())]
	ans = max(a)
	s = ''
	l = ''
	d = ''
	se = 0
	count = 0
	if ans != 0:
		for i in range(97, 97 + ans):
			if i >= 97 and i <= 122:
				s += chr(i)
			elif i >= 123 and i <= 148:
				i -= 26
				s += chr(i)
		count += 1
		print(s)
	for j in range(0, len(a)):
		if a[j] == 0:
			if se == 0:
				if ans == 0:
					s += 'a'
					count += 1
					print(s)
					d = s
					se += 1
				else:
					l = ''
					for k in range(len(s)):
						su = s[k]
						sk = ord(su)
						if sk == 122:
							l += chr(97)
						else:
							sk += 1
							l += chr(sk)
					se += 1
					count += 1
					print(l)
					s = l
					d = s
					l = ''
			else:
				for k in range(len(s)):
					su = s[k]
					sk = ord(su)
					if sk == 122:
						l += chr(97)
					else:
						sk += 1
						l += chr(sk)
				count += 1
				print(l)
				s = l
				d = s
				l = ''
			if count != n + 1:
				if j == len(a) - 1:
					sk = ord(d)
					if sk == 122:
						count += 1
						print(chr(97))
					else:
						sk += 1
						count += 1
						print(chr(sk))
		else:
			for k in range(a[j]):
				l += s[k]
			for m in range(a[j], len(s)):
				su = s[m]
				sk = ord(su)
				if sk == 122:
					l += chr(97)
				else:
					sk += 1
					l += chr(sk)
			count += 1
			print(l)
			s = l
			l = ''


for _ in range(int(input())):
	n = int(input())
	lst = list(map(int, input().split()))
	mx = n if n > max(lst) else max(lst)
	k = 97
	stk = [chr(k) * mx for _ in range(n + 1)]
	k += 1
	for i in range(n):
		if len(stk[i]) == lst[i]:
			stk[i + 1] = stk[i]
		else:
			stk[i + 1] = stk[i][0:lst[i]] + chr(k) * (mx - lst[i])
			if k < 122:
				k += 1
			else:
				k = 97
	print('\n'.join(stk))


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	i = 0
	ans = []
	charInc = 98
	chg = 0
	while i < n:
		if a[i] == 0:
			if i == 0:
				ans.append(chr(charInc))
				charInc += 1
				if charInc > 122:
					chg += 1
					charInc = 97 + chg
				ans.append(chr(charInc))
				charInc += 1
				if charInc > 122:
					chg += 3
					charInc = 97 + chg
			else:
				ans.append(chr(charInc))
				charInc += 1
				if charInc > 122:
					chg += 3
					charInc = 97 + chg
		elif len(ans) == 0:
			ans.append('a' * a[i])
			ans.append('a' * a[i])
		elif a[i - 1] < a[i]:
			ans[-1] = ans[-1] + chr(charInc) * (a[i] - len(ans[-1]))
			ans.append(ans[-1])
			charInc += 1
			if charInc > 122:
				chg += 3
				charInc = 97 + chg
		elif a[i - 1] > a[i]:
			ans.append(ans[-1][:a[i]])
		else:
			ans.append(ans[-1])
		i += 1
	for i in ans:
		print(i)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	out = 'a' * 50
	j = 1
	print(out)
	for i in range(n):
		tmp = out[:a[i]]
		if a[i] != 50:
			j += 1
		out = tmp + chr(j % 26 + 97) * (50 - len(tmp))
		print(out)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	b = 'a' * 200
	print(b)
	for x in arr:
		b = list(b)
		b[x] = 'b' if b[x] == 'a' else 'a'
		print(''.join(b))


import sys

def input():
	return sys.stdin.readline()[:-1]

def N():
	return int(input())

def NM():
	return map(int, input().split())

def L():
	return list(NM())
t = N()
ans = ['a'] * 100
for i in range(t):
	n = N()
	l = L()
	print(''.join(ans))
	for i in l:
		if ans[i] == 'a':
			ans[i] = 'b'
		else:
			ans[i] = 'a'
		print(''.join(ans))


import random
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	x = max(a)
	l = ['a' for i in range(x + 1)]
	for i in range(len(l)):
		print(l[i], end='')
	print()
	for i in range(n):
		if l[a[i]] == 'a':
			l[a[i]] = 'b'
		else:
			l[a[i]] = 'a'
		for k in range(x + 1):
			print(l[k], end='')
		print()


maxs = 190
t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(j) for j in input().split()]
	ans = [0] * (n + 1)
	ans[0] = 'a' * maxs
	for i in range(1, n + 1):
		num = arr[i - 1]
		current = ''
		for j in range(num):
			current += ans[i - 1][j]
		if ans[i - 1][num] == 'a':
			current += 'b'
		else:
			current += 'a'
		for j in range(num + 1, maxs):
			current += current[j - 1]
		ans[i] = current
	print(*ans, sep='\n')


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print(51 * 'a')
	s = ''
	d = []
	d.append(51 * 'a')
	for i in range(n):
		s = d[-1]
		l = list(s)
		if l[a[i]] == 'a':
			l[a[i]] = 'b'
		else:
			l[a[i]] = 'a'
		s = ''
		s = s.join(l)
		d.append(s)
		print(s)


t = int(input())
while t != 0:
	n = int(input())
	a = list(map(int, input().split()))[:n]
	high = max(a)
	net = ['a' * (high + 1)] * (n + 1)
	for (i, x) in enumerate(a):
		if net[i][x] == 'b':
			last = 'a'
		else:
			last = 'b'
		net[i + 1] = net[i][:x] + last + net[i][x + 1:]
	print('\n'.join(net))
	t -= 1


t = int(input())
while t != 0:
	t -= 1
	a = int(input())
	arr = list(map(int, input().split(' ')))
	s1 = 'a' * 200
	print(s1)
	for i in range(a):
		ans = s1[0:arr[i]] + 'b' + s1[arr[i] + 1:]
		if ans[arr[i]] == s1[arr[i]] == 'b':
			ans = ans[0:arr[i]] + 'a' + ans[arr[i] + 1:]
		elif ans[arr[i]] == s1[arr[i]] == 'a':
			ans = ans[0:arr[i]] + 'b' + ans[arr[i] + 1:]
		print(ans)
		s1 = ans


a = int(input())

def get(a):
	arr = ['a', 'b', 'c', 'd', 'e', 'z']
	arr.remove(a)
	return arr[0]
for i in range(0, a):
	b = int(input())
	arr = list(map(int, input().split()))
	ans = []
	ans.append(['a'] * arr[0])
	for i in range(0, len(arr)):
		if arr[i] > len(ans[len(ans) - 1]):
			ans[len(ans) - 1] = ans[len(ans) - 1] + ['b'] * (arr[i] - len(ans[len(ans) - 1]))
			ans.append(ans[len(ans) - 1])
		elif arr[i] < len(ans[len(ans) - 1]):
			ans.append(ans[len(ans) - 1][:arr[i]] + [get(ans[len(ans) - 1][arr[i]])])
		else:
			ans.append(ans[len(ans) - 1][:arr[i]] + [get('b')])
	for i in ans:
		if i == []:
			print('l')
		else:
			print(''.join(i))


from os import path
import sys
from heapq import heappush, heappop, heapify
from functools import cmp_to_key as ctk
from collections import deque, defaultdict as dd
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from itertools import permutations
from datetime import datetime
from math import ceil, sqrt, log, gcd

def ii():
	return int(input())

def si():
	return input().rstrip()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def bo(i):
	return ord(i) - ord('a')
file = 1

def solve():
	for _ in range(ii()):
		n = ii()
		a = li()
		s = list('a' * 51)
		print(''.join(s))
		for i in a:
			if s[i] != 'b':
				s[i] = 'b'
			else:
				s[i] = 'c'
			print(''.join(s))
if file:
	if path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	else:
		input = sys.stdin.readline
solve()


import copy
t = int(input().strip())
while t > 0:
	t -= 1
	n = int(input())
	a = list(map(int, input().strip().split()))
	ans = []
	pre_s = ''.join(['a' for i in range(50)])
	ans.append(pre_s)
	for i in range(len(a)):
		new_s = ''
		for j in range(50):
			if j < a[i]:
				new_s += ans[i][j]
			else:
				new_s += chr((ord(ans[i][j]) - ord('a') + 1) % 26 + ord('a'))
		ans.append(new_s)
	for s in ans:
		print(s)


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator
from collections import deque, defaultdict, OrderedDict
import collections

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	zz = 0
	for _ in range(ri()):
		n = ri()
		a = ria()
		ans = []
		ans.append('a' * 200)
		for i in range(n):
			c = list(ans[-1])
			z = a[i]
			if c[z] == 'b':
				c[z] = 'a'
			else:
				c[z] = 'b'
			ans.append(''.join(c))
		for i in ans:
			print(i)
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


import string
t = int(input())
dict1 = list(string.ascii_lowercase)
while t > 0:
	n = int(input())
	arr = input().split()
	arr = [int(i) for i in arr]
	max1 = max(arr)
	if max1 == 0:
		max1 = 1
	ans = ['a' * max1]
	for i in arr:
		str1 = ans[-1][0:i]
		num1 = max1 - i
		temp = ''
		for j in range(num1):
			for k in dict1:
				if k != ans[-1][i] and k not in temp:
					temp += k
					break
		str1 += temp
		ans.append(str1)
	print(*ans, sep='\n')
	t -= 1


T = int(input())
while T:
	n = int(input())
	A = list(map(int, input().split()))
	A.append(A[n - 1])
	X = []
	s = 'a' * max(A[0], 1)
	c = 0
	X.append(s)
	for i in range(n):
		if A[i] == 0:
			c = c + 1
			s = chr(97 + c % 26) * max(A[i + 1], 1)
			X.append(s)
		elif A[i] <= A[i + 1]:
			s = s + (A[i + 1] - len(s)) * chr(97 + c % 26)
			X.append(s)
		else:
			X.append(s)
			c = c + 1
			s = s[:A[i + 1]]
	for i in X:
		print(i)
	T = T - 1


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	s = ''
	for i in range(52):
		s += 'a'
	ans = []
	ans.append(s)
	for i in range(n):
		s = list(ans[-1])
		if s[arr[i]] == 'b':
			for j in range(arr[i], 52):
				s[j] = 'a'
		else:
			for j in range(arr[i], 52):
				s[j] = 'b'
		ans.append(''.join(s))
	for i in ans:
		print(i)


for l in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = ['a'] * (max(a) + 1)
	print(''.join(list(map(str, b))))
	for i in a:
		for j in range(i, max(a) + 1):
			b[j] = chr((ord(b[j]) - 96) % 26 + 97)
		print(''.join(list(map(str, b))))


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	k = max(l)
	a = ['a' * (k + 1)] * (n + 1)
	for (i, x) in enumerate(l):
		y = 'a' if a[i][x] == 'b' else 'b'
		a[i + 1] = a[i][:x] + y + a[i][x + 1:]
	print('\n'.join(a))


from random import randint
from random import choice

def new_cf(exc):
	return choice([i for i in range(97, 123) if i not in [exc]])

def solve2(s1, id):
	s2 = s1[-1]
	exc = ord(s2[id])
	new_c = chr(new_cf(exc))
	s3 = s2[:id] + new_c + s2[id + 1:]
	s1.append(s3)

def solve(a):
	st = ''
	for i in range(max(a) + 2):
		ch = chr(randint(97, 122))
		st += ch
	s = []
	s.append(st)
	for i in range(len(a)):
		solve2(s, a[i])
	return s
for _ in range(int(input().strip())):
	n = int(input().strip())
	a = list(map(int, input().strip().split()))
	for m in solve(a):
		print(m)


t = int(input())
for i in range(t):
	n = int(input())
	nums = [int(x) for x in input().split(' ')]
	s = 'a' * 101
	print(s)
	for j in range(n):
		nu = ord(s[nums[j]])
		if nu == 122:
			nu = ord('a')
		else:
			nu += 1
		s = s[:nums[j]] + chr(nu) + s[nums[j] + 1:]
		print(s)


from sys import stdin
g = lambda : stdin.readline().strip()
gl = lambda : g().split()
gil = lambda : [int(var) for var in gl()]
gcl = lambda : list(g())
gbs = lambda : [int(var) for var in g()]
(t,) = gil()
for _ in range(t):
	(n,) = gil()
	arr = gil()
	size = max(arr)
	size = max(size, 1)
	string = ['a'] * size
	print(''.join(string))
	cnt = 1
	for diff in arr:
		char = chr(97 + cnt)
		for j in range(diff, size):
			string[j] = char
		print(''.join(string))
		cnt = (cnt + 1) % 25


t = int(input())
for j in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s1 = 'a' * 200
	print(s1)
	for i in range(n):
		ln = a[i]
		s2 = s1[:ln]
		for k in range(200 - ln):
			if s1[ln + k] == 'a':
				s2 += 'b'
			else:
				s2 += 'a'
		print(s2)
		s1 = s2


t = int(input())
for test in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	string = ''.join(['a' for i in range(200)])
	s = []
	s.append(string)
	for a_i in a:
		string_list = list(string)
		if string_list[a_i] == 'a':
			string_list[a_i] = 'b'
		else:
			string_list[a_i] = 'a'
		string = ''.join(string_list)
		s.append(string)
	for s_i in s:
		print(s_i)


test = int(input())
for t in range(test):
	n = int(input())
	l = list(map(int, input().split()))
	prev_str = [97] * 52
	for j in range(52):
		print(chr(prev_str[j]), end='')
	print()
	for i in l:
		for j in range(52):
			if j < i:
				print(chr(prev_str[j]), end='')
			else:
				prev_str[j] += 1
				prev_str[j] = prev_str[j] % 13 + 97
				print(chr(prev_str[j]), end='')
		print()


import random
chars = 'abcdefghijklmnopqrstuvwxyz'
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(s) for s in input().split(' ')]
	current_word = ''
	for _ in range(max(a) + 1):
		current_word += random.choice(chars)
	print(current_word)
	for i in a:
		new_char = random.choice(chars)
		while new_char == current_word[i]:
			new_char = random.choice(chars)
		next_word = current_word[:i] + new_char + current_word[i + 1:]
		current_word = next_word
		print(current_word)


t = int(input())
for t in range(t):
	al = int(input())
	a = list(map(int, input().split()))[:al]
	maxele = max(a)
	n = len(a)
	l = ['a' * (maxele + 1)] * (n + 1)
	for (i, x) in enumerate(a):
		altele = 'a' if l[i][x] == 'b' else 'b'
		l[i + 1] = l[i][:x] + altele + l[i][x + 1:]
	print('\n'.join(l))


t = int(input())
while t > 0:
	n = int(input())
	x = [int(i) for i in input().split()]
	m = max(x)
	s = 'a' * (m + 1)
	print(s)
	for i in x:
		if s[i] == 'a':
			s = s[:i] + 'b' + s[i + 1:]
		else:
			s = s[:i] + 'a' + s[i + 1:]
		print(s)
	t -= 1


def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
for _ in range(ii()):
	n = ii()
	a = li()
	if a[0] > 0:
		s = 'a' * a[0]
		ans = [s, s]
	else:
		ans = ['a', 'b']
	for i in range(1, n):
		x = a[i]
		s1 = ans[-1]
		if len(s1) < x:
			f = 0
			s2 = ans[-2]
			if len(s2) > len(s1) and s2[len(s1)] == 'z':
				f = 1
			if f == 0:
				s = s1 + 'z' * (x - len(s1))
				ans[-1] = s
			else:
				s = s1 + 'y' * (x - len(s1))
				ans[-1] = s
		elif x == 0:
			if s1[0] != 'z':
				s = 'z'
			else:
				s = 'y'
		else:
			s = s1[:x]
		ans.append(s)
	for i in ans:
		print(i)


import math
import bisect
import copy
import time
from collections import Counter
for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	f = 0
	o = 122
	ans = ['a' * 50]
	for i in range(n):
		s = ans[-1][:l[i]]
		if l[i] == 0:
			ans.append(chr(o) * 50)
			o -= 1
			if o == 97:
				o = 122
			continue
		for j in range(l[i], 50):
			s += chr(o)
		o -= 1
		if o == 97:
			o = 122
		ans.append(s)
	for i in range(n + 1):
		print(ans[i])


t = int(input())
for _ in range(t):
	n = int(input())
	final = []
	Arr = list(map(int, input().split(' ')))
	for i in range(n + 1):
		final.append('abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvw')
	for i in range(n):
		final[i + 1] = final[i]
		if final[i + 1][Arr[i]] == 'y':
			final[i + 1] = final[i + 1][0:Arr[i]] + 'x' + final[i + 1][Arr[i] + 1:]
		elif final[i + 1][Arr[i]] == 'x':
			final[i + 1] = final[i + 1][0:Arr[i]] + 'y' + final[i + 1][Arr[i] + 1:]
		else:
			final[i + 1] = final[i + 1][0:Arr[i]] + 'x' + final[i + 1][Arr[i] + 1:]
	for i in range(n + 1):
		print(final[i])


import heapq as hp
import collections
import bisect
import math
import re

def unpack(func=int):
	return map(func, input().split())

def l_unpack(func=int):
	return list(map(func, input().split()))

def s_unpack(func=int):
	return sorted(map(func, input().split()))

def ml_unpack(n):
	return [int(input()) for i in range(n)]

def range_n():
	return range(int(input()))

def getint():
	return int(input())

def counter(a):
	d = {}
	for x in a:
		if x in d:
			d[x] += 1
		else:
			d[x] = 1
	return d

def main():
	for _ in range_n():
		n = getint()
		a = l_unpack()
		MAX = max(a)
		first = 'a' * MAX if MAX else 'a'
		ans = [first]
		for i in range(n):
			common = a[i]
			st = ans[-1]
			temp = st[:common]
			last = chr(ord(st[common]) + 1) if st and common < len(st) and (st[common] != 'z') else 'a'
			k = min(200, MAX + len(temp))
			last *= k if k else 1
			ans.append(temp + last)
		print(*ans, sep='\n')
main()


T = int(input())
for t in range(T):
	n = int(input())
	a = [int(x) for x in input().split()]
	len1 = a[0]
	ordc = 97
	p = ''
	handc = 122
	if len1 != 0:
		for i in range(len1):
			p = p + chr(ordc)
	else:
		p = ''
		for k in range(6):
			p = p + chr(handc)
	print(p)
	pr = p
	for j in range(1, n):
		slen = max(a[j - 1], a[j])
		common = a[j - 1]
		if common > 0:
			p = ''
			p = pr[:common]
			if slen <= common:
				print(p)
				pr = p
			else:
				ordc += 1
				if ordc > 122:
					ordc = 97
				for k in range(slen - common):
					p = p + chr(ordc)
				print(p)
				pr = p
		else:
			handc -= 1
			if handc < 97:
				handc = 122
			p = ''
			for k in range(max(slen, 6)):
				p = p + chr(handc)
			print(p)
			pr = p
	if a[-1] > 0:
		for k in range(a[-1]):
			p = pr[:a[-1]]
	else:
		handc -= 1
		if handc < 97:
			handc = 122
		p = ''
		for k in range(6):
			p = p + chr(handc)
	print(p)
ord('z')


import sys
import math
input = sys.stdin.readline

def nt(c):
	return 'b' if c == 'a' else 'a'
T = int(input())
for t in range(T):
	N = int(input())
	A = list(map(int, input().split(' ')))
	rows = []
	if A[0]:
		rows.append(A[0] * 'a')
		rows.append(A[0] * 'a')
	else:
		rows.append('b')
		rows.append('a')
	for i in range(1, N):
		if A[i] == 0:
			rows.append(nt(rows[-1][0]))
			continue
		if A[i] > A[i - 1]:
			c = 'b'
			if i > 1 and len(rows[-2]) > len(rows[-1]):
				c = nt(rows[-2][len(rows[-1])])
			rows[-1] += (A[i] - len(rows[-1])) * c
			rows.append(rows[-1])
		else:
			rows.append(rows[-1][:A[i]])
	for row in rows:
		print(row)


from string import ascii_lowercase as lc
import random
for i in range(int(input())):
	n = int(input())
	ls = [int(a) for a in input().split()]
	ls.append(ls[-1])
	an = []
	an.append(''.join((random.choice(lc) for _ in range(ls[0] + 1))))
	for j in range(1, n + 1):
		sr = an[-1][:ls[j - 1]]
		if ls[j] >= len(sr):
			while len(sr) != ls[j] + 1:
				a = random.choice(lc)
				if a != an[-1][ls[j - 1]] and a != an[-1][0]:
					sr += a
		an.append(sr)
	for j in range(n + 1):
		print(an[j])


from sys import stdin
T = int(stdin.readline().strip())
let = [chr(i) for i in range(97, 97 + 26)]
for caso in range(T):
	n = int(stdin.readline().strip())
	s = list(map(int, stdin.readline().strip().split()))
	ans = ['a' * 110]
	for i in range(n):
		x = ans[-1][0:s[i]]
		for j in let:
			if j != ans[-1][s[i]]:
				x += j
				break
		x += ans[-1][s[i] + 1:]
		ans.append(x)
	for i in ans:
		print(i)


import sys
input = sys.stdin.buffer.readline

def print(val):
	sys.stdout.write(val + '\n')

def prog():
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		last = list('a' * 51)
		print(''.join(last))
		for i in a:
			if last[i] == 'a':
				last[i] = 'b'
			else:
				last[i] = 'a'
			print(''.join(last))
prog()


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(_) for _ in input().split()]
	s = []
	for x in range(n + 1):
		s.append('')
	s[0] = 'a' * 100
	for i in range(n):
		s[i + 1] = s[i]
		temp = list(s[i + 1])
		if temp[a[i]] == 'a':
			temp[a[i]] = 'b'
			s[i + 1] = ''.join(temp)
		else:
			temp[a[i]] = 'a'
			s[i + 1] = ''.join(temp)
	for i in s:
		print(i)


for _ in range(int(input())):
	n = int(input())
	l1 = [x for x in map(int, input().split())]
	temp = max(l1) + 1
	l2 = []
	temp2 = ['a' for i in range(temp)]
	l2.append(temp2)
	k = 0
	for i in range(n):
		if l2[-1][l1[k]] == 'a':
			tem = l2[-1][:]
			tem[l1[k]] = 'b'
			l2.append(tem)
		else:
			tem = l2[-1][:]
			tem[l1[k]] = 'a'
			l2.append(tem)
		k = k + 1
	for i in l2:
		print(''.join(i))


from sys import stdin
input = stdin.readline
import math
for xoxo in range(1):
	s = ''
	for i in range(150):
		s += 'a'
	for _ in range(int(input())):
		n = int(input())
		x = 0
		c = ['' for i in range(n)]
		a = list(map(int, input().split()))
		y = max(max(a), 1)
		s1 = s[:y]
		s2 = ''
		print(s[:y])
		for i in range(n):
			for j in range(a[i]):
				s2 += s1[j]
			for j in range(a[i], y):
				if s1[j] == 'a':
					s2 += 'b'
				else:
					s2 += 'a'
			print(s2)
			s1 = s2
			s2 = ''


production = True
import sys, math, collections

def input(input_format=0, multi=0):
	if multi > 0:
		return [input(input_format) for i in range(multi)]
	else:
		next_line = sys.stdin.readline()[:-1]
		if input_format >= 10:
			use_list = False
			input_format = int(str(input_format)[-1])
		else:
			use_list = True
		if input_format == 0:
			formatted_input = [next_line]
		elif input_format == 1:
			formatted_input = list(map(int, next_line.split()))
		elif input_format == 2:
			formatted_input = list(map(float, next_line.split()))
		elif input_format == 3:
			formatted_input = list(next_line)
		elif input_format == 4:
			formatted_input = list(map(int, list(next_line)))
		elif input_format == 5:
			formatted_input = next_line.split()
		else:
			formatted_input = [next_line]
		return formatted_input if use_list else formatted_input[0]

def out(output_line, output_format=0, newline=True):
	formatted_output = ''
	if output_format == 0:
		formatted_output = str(output_line)
	elif output_format == 1:
		formatted_output = ' '.join(map(str, output_line))
	elif output_format == 2:
		formatted_output = '\n'.join(map(str, output_line))
	elif output_format == 3:
		formatted_output = ''.join(map(str, output_line))
	print(formatted_output, end='\n' if newline else '')

def log(*args):
	if not production:
		print('$$$', end='')
		print(*args)
enu = enumerate
ter = lambda a, b, c: b if a else c
ceil = lambda a, b: -(-a // b)
flip = lambda a: a + 1 & 1

def mapl(iterable, format=0):
	if format == 0:
		return list(map(int, iterable))
	elif format == 1:
		return list(map(str, iterable))
	elif format == 2:
		return list(map(list, iterable))

def solve():
	n = input(11)
	a = input(1)
	l = 'a' * 60
	t = 1
	c = ['a', 'b', 'c']
	out(l)
	for i in a:
		y = l[i]
		l = l[:i]
		if y == 'b':
			k = 'a'
		else:
			k = 'b'
		l += k * (60 - i)
		out(l)
	return
for i in range(input(11)):
	solve()


t = int(input())
for testcase in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	laststring = 'a' * 50
	print(laststring)
	for i in range(n):
		ln = A[i]
		ns = ''
		if ln == 0:
			cr = 'a'
			if laststring[0] == 'a':
				cr = 'b'
			ns = cr
		for p in range(ln):
			ns += laststring[p]
		if i < n - 1 and ln < A[i + 1]:
			ch = 'a'
			if len(laststring) > ln and laststring[ln] == 'a':
				ch = 'b'
			for u in range(A[i + 1] - ln):
				ns += ch
		print(ns)
		laststring = ns


from sys import stdin, setrecursionlimit, stdout
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
from heapq import heapify, heappop, heappush, heapreplace, heappushpop
from bisect import bisect_right, bisect_left

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline().rstrip()

def lsi():
	return list(si())
mod = 1000000007
res = ['NO', 'YES']
test = test_case = 1
test_case = ii()
while test <= test_case:
	test += 1
	n = ii()
	a = li()
	mx = max(a) + 1
	ans = ['a' * mx]
	for i in range(n):
		z = i % 24
		z = chr(99 + z)
		ans.append(ans[-1][:a[i]] + z * (mx - a[i]))
	for i in ans:
		print(i)


ll = lambda : list(map(int, input().split()))
st = lambda : input()
v = lambda : map(int, input().split())
ii = lambda : int(input())
from collections import *
from math import *
from datetime import datetime
from sys import stdin, stdout
for _ in range(ii()):
	n = ii()
	a = ll()
	l1 = []
	l = max(a)
	if max(a) != 0:
		s = 'a' * max(a)
		l1.append(s)
		for i in range(n):
			s1 = ''
			for j in range(a[i]):
				s1 = s1 + l1[-1][j]
			for k in range(a[i], l):
				if ord(l1[-1][k]) == 122:
					s1 = s1 + chr(97)
				else:
					s1 = s1 + chr(ord(l1[-1][k]) + 1)
			l1.append(s1)
		for i in l1:
			print(i)
	else:
		s = 'a'
		l2 = []
		l2.append(s)
		for i in range(n):
			l2.append(chr(ord(l2[-1]) + 1))
		for j in l2:
			print(j)


inp = lambda cast=int: [cast(x) for x in input().split()]
printf = lambda s='', *args, **kwargs: print(str(s).format(*args), flush=True, **kwargs)
(t,) = inp()
for _ in range(t):
	(n,) = inp()
	A = inp()
	B = ['a' * A[0] + 'b' * (200 - A[0])]
	for i in range(1, n + 1):
		B.append(B[i - 1][:A[i - 1]] + chr(ord('a') + i % 25 + 1) * (200 - A[i - 1]))
	for b in B:
		print(b)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	temp = 'a' * 105
	last = a[0]
	print(temp)
	charr = 'a'
	for i in a:
		cut = temp[:i]
		if temp[i] == 'b':
			charr = 'a'
		else:
			charr = 'b'
		cut += charr * 105
		print(cut)
		temp = cut


for i in range(int(input())):
	n = int(input())
	p = [int(i) for i in input().split()]
	s = list('a' * 52)
	print(''.join(s))
	for i in range(n):
		if s[p[i]] == 'a':
			s[p[i]] = 'b'
		else:
			s[p[i]] = 'a'
		print(''.join(s))


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	ans = ['a' * 201] * (n + 1)
	for (i, x) in enumerate(a):
		if ans[i][x] == 'b':
			m = 'a'
		else:
			m = 'b'
		ans[i + 1] = ans[i][:x] + m + ans[i][x + 1:]
	p = 0
	while p < n + 1:
		string = ''
		q = 0
		while q < 200:
			string += ans[p][q]
			q += 1
		print(string)
		p += 1


import sys
input = lambda : sys.stdin.readline().rstrip()
for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	ans = 'a' * 200
	print(ans)
	for i in a:
		if ans[i] == 'a':
			ans = ans[:i] + 'b' * (200 - i)
		else:
			ans = ans[:i] + 'a' * (200 - i)
		print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	a = map(int, input().split())
	print(60 * 'a')
	prevs = 60 * 'a'
	c = 'b'
	for i in a:
		assert i < 60
		curs = prevs[:i]
		curs += (60 - i) * c
		print(curs)
		prevs = curs
		c = chr(ord(c) + 1)
		if ord(c) == ord('z'):
			c = 'a'


t = int(input())
for _ in range(t):
	n = int(input())
	li = list(map(int, input().split()))
	ans = []
	temp = ['a'] * 60
	ans.append(temp)
	for i in range(1, n + 1):
		temp = []
		j = 0
		prev = ans[i - 1]
		while j < li[i - 1]:
			temp.append(prev[j])
			j += 1
		if prev[j] == 'a':
			temp.append('b')
		else:
			temp.append('a')
		j += 1
		while j < 60:
			temp.append(prev[j])
			j += 1
		ans.append(temp)
	for i in range(n + 1):
		temp = ans[i]
		for j in range(60):
			print(temp[j], end='')
		print()


import sys

def solve(lens):
	base = ord('a')
	wlen = max(lens) + 2
	last = ['a'] * wlen
	word_list = [''.join(last)]
	for l in lens:
		last[l] = chr(base + (ord(last[l]) - ord('a') + 1) % 26)
		word_list.append(''.join(last))
	return word_list

def __starting_point():
	IN = [x.strip() for x in sys.stdin.readlines()]
	T = int(IN[0])
	cur = 1
	for ti in range(T):
		a = int(IN[cur])
		lens = [int(x) for x in IN[cur + 1].split(' ')]
		res = solve(lens)
		for w in res:
			print(w)
		cur += 2
__starting_point()


import sys
import math
from decimal import *

def I():
	return int(sys.stdin.readline())

def IL():
	return list(map(int, sys.stdin.readline().strip().split()))

def ILS():
	return list(map(str, sys.stdin.readline().strip().split()))

def solve():
	tt = I()
	for ii in range(tt):
		n = I()
		l = IL()
		s = 'd'
		cc = ['a', 'b', 'c']
		ma = {'a': 'b', 'b': 'c', 'c': 'd', 'd': 'a'}
		cnt = 0
		for ll in l:
			ns = s
			if len(s) < ll:
				c = s[-1]
				while len(s) < ll:
					s += ma[c]
				print(s)
			elif len(s) == ll:
				print(s)
			else:
				print(s)
				c = s[ll]
				prevl = len(s)
				s = s[:ll]
				while len(s) < prevl:
					s += ma[c]
		res = s[:l[-1]]
		if len(res) == 0:
			print('m')
		else:
			print(res)
		pass
solve()


import sys
import random
import string

def get_random_string(length):
	letters = string.ascii_lowercase
	result_str = ''.join((random.choice(letters) for i in range(length)))
	return result_str
input = sys.stdin.readline
for f in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	maxer = max(arr)
	s = get_random_string(maxer + 1)
	print(s)
	for i in range(n):
		if s[arr[i]] == 'z':
			temp = s[:arr[i]] + chr(ord(s[arr[i]]) - 1) + s[arr[i]:]
		else:
			temp = s[:arr[i]] + chr(ord(s[arr[i]]) + 1) + s[arr[i]:]
		print(temp)
		s = temp


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	m = max(l) + 1
	s = ''
	for i in range(m):
		s += chr(i % 26 + 97)
	print(s)
	for i in range(n):
		p = l[i]
		m = ord(s[p]) - 97
		s = s[:p] + chr((m + 1) % 26 + 97) + s[p + 1:]
		print(s)


def fun(c):
	if c == 'z':
		return 'a'
	else:
		return chr(ord(c) + 1)
for i in range(int(input())):
	n = int(input())
	a = 'qwertyuasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzqwert'
	l = [0] + list(map(int, input().split()))
	print(a)
	for i in range(1, n + 1):
		a = a[:l[i]] + fun(a[l[i]]) + a[l[i] + 1:]
		print(a)


t = int(input())
while t != 0:
	n = int(input())
	list1 = list(map(int, input().split()))
	a = 'a' * 100
	ans = []
	ans.append(a)
	for i in range(n):
		temp = list(a)
		k = list1[i]
		if temp[k] == 'b':
			temp[k] = 'a'
		else:
			temp[k] = 'b'
		string1 = ''
		for j in range(len(temp)):
			string1 += temp[j]
		ans.append(string1)
		a = string1
	for i in range(len(ans)):
		print(ans[i])
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	al = list(map(int, input().split()))
	maxx = max(al)
	string = 'a' * (maxx + 1)
	ans = [string for i in range(n + 1)]
	for i in range(len(al)):
		x = al[i]
		if ans[i][x] == 'a':
			change = 'b'
		else:
			change = 'a'
		ans[i + 1] = ans[i][:x] + change + ans[i][x + 1:]
	for string in ans:
		print(string)


def generate_strings(common_lengths):
	res = [[] for i in range(len(common_lengths) + 1)]
	res[0].append('a')
	for (i, cur_len) in enumerate(common_lengths):
		j = 0
		while j < cur_len:
			if j < len(res[i]):
				res[i + 1].append(res[i][j])
			else:
				res[i].append('a')
				res[i + 1].append('a')
			j += 1
		if j == len(res[i]):
			res[i].append('a')
		diff = (ord(res[i][j]) + 1) % 123
		while diff < 97:
			diff += 26
			diff %= 123
		res[i + 1].append(chr(diff))
	for i in range(len(res)):
		res[i] = ''.join(res[i])
	return res

def output(res):
	for e in res:
		print(e)
T = int(input())
res = [None] * T
for t in range(T):
	n = input()
	common_lengths = [int(num) for num in input().split()]
	res[t] = generate_strings(common_lengths)
for r in res:
	output(r)


I = input
for _ in range(int(I())):
	n = int(I())
	a = list(map(int, I().split()))
	ans = []
	m = max(a)
	for i in range(n + 1):
		ans.append('a' * (m + 2))
	for i in range(n):
		t1 = ans[i]
		t1 = list(t1)
		q = t1[:a[i] + 1]
		t = 'a' if ans[i][a[i]] == 'b' else 'b'
		q[a[i]] = t
		ans[i + 1] = ''.join(q + t1[a[i] + 1:])
	for i in ans:
		print(i)


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	maxx = max(l)
	s = 'a' * (maxx + 1)
	print(s)
	for j in range(n):
		gen = ''
		for k in range(0, l[j]):
			gen += s[k]
		for k in range(l[j], maxx + 1):
			num = ord(s[k]) + 1
			if num >= 123:
				num %= 123
				num += 97
			gen += chr(num)
		print(gen)
		s = gen


from __future__ import division, print_function
from sys import stdin, stdout
import bisect
import math
import heapq
i_m = 9223372036854775807

def inin():
	return int(input())

def stin():
	return input()

def spin():
	return map(int, stin().split())

def lin():
	return list(map(int, stin().split()))

def matrix(n):
	return [list(map(int, input().split())) for i in range(n)]

def count2Dmatrix(i, list):
	return sum((c.count(i) for c in list))

def modinv(n, p):
	return pow(n, p - 2, p)

def GCD(x, y):
	x = abs(x)
	y = abs(y)
	if min(x, y) == 0:
		return max(x, y)
	while y:
		(x, y) = (y, x % y)
	return x

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l
prime = []

def SieveOfEratosthenes(n):
	global prime
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	f = []
	for p in range(2, n):
		if prime[p]:
			f.append(p)
	return f
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j
for _ in range(inin()):
	n = inin()
	a = lin()
	mx = max(a)
	ans = ['a' * (mx + 1)] * (n + 1)
	for (i, x) in enumerate(a):
		temp = 'a' if ans[i][x] == 'b' else 'b'
		ans[i + 1] = ans[i][:x] + temp + ans[i][x + 1:]
	print('\n'.join(ans))


def readGenerator():
	while True:
		tokens = input().split(' ')
		for t in tokens:
			yield t
reader = readGenerator()

def readWord():
	return next(reader)

def readInt():
	return int(next(reader))

def readFloat():
	return float(next(reader))

def readLine():
	return input()
tests = readInt()
for t in range(0, tests):
	n = readInt()
	l = [readInt() for _ in range(0, n)]
	res = ['a' * max(l[0], 1)]
	for i in range(0, n):
		if l[i] > 0:
			res.append(res[i][0:l[i]])
		else:
			res.append(chr(ord('a') + (ord(res[i][0]) - ord('a') + 1) % 26))
		if i != n - 1 and len(res[i + 1]) < l[i + 1]:
			w = 'a'
			if len(res[i]) > len(res[i + 1]):
				w = chr(ord('a') + (ord(res[i][len(res[i + 1])]) - ord('a') + 1) % 26)
			res[i + 1] += w * (l[i + 1] - len(res[i + 1]))
	for v in res:
		print(v)


import math
from collections import defaultdict
ml = lambda : map(int, input().split())
ll = lambda : list(map(int, input().split()))
ii = lambda : int(input())
ip = lambda : input()
t = ii()
for _ in range(t):
	n = ii()
	a = ll()
	s = ['a'] * 200
	print(''.join(s))
	for i in a:
		if s[i] == 'a':
			s[i] = 'b'
		else:
			s[i] = 'a'
		print(''.join(s))


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
char = 'qwertyuiopasdfghjklxcvbnm'
for _ in range(Int()):
	n = Int()
	a = array()
	ma = max(a)
	id = 0
	s = ['z' for i in range(ma + 1)]
	print(*s, sep='')
	for i in range(1, n + 1):
		id = (id + 1) % 25
		s[a[i - 1]] = char[id]
		print(*s, sep='')


import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
import string

def find(a):
	temp = ord(a) - 97
	temp += 1
	temp %= 26
	return string.ascii_lowercase[temp]
t = int(input())
for _ in range(t):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	ans = []
	ans.append('a' * 51)
	for i in a:
		temp = ans[-1]
		temp = temp[:i] + find(temp[i]) + temp[i + 1:]
		ans.append(temp)
	for i in ans:
		print(i)


for t in range(int(input())):
	n = int(input())
	n1 = map(int, input().split())
	N = list(n1)
	n2 = [N[0]]
	n2.extend(N)
	c = []
	if max(N) > 0:
		for _ in range(max(N)):
			c.append('a')
		print(''.join(c))
		for i in range(n):
			if N[i] < max(N):
				if c[N[i]] == 'a':
					for ii in range(N[i], len(c)):
						c[ii] = 'b'
				else:
					for jj in range(n2[i + 1], len(c)):
						c[jj] = 'a'
			else:
				pass
			print(''.join(c))
	else:
		for _ in range(max(n2) + 1):
			c.append('a')
		print(''.join(c))
		for i in range(n):
			if c[n2[i + 1]] == 'a':
				for ii in range(n2[i + 1], len(c)):
					c[ii] = 'b'
			else:
				for jj in range(n2[i + 1], len(c)):
					c[jj] = 'a'
			print(''.join(c))


t = int(input())
cnt = 0
while cnt < t:
	cnt += 1
	res = []
	n = int(input())
	a = [int(i) for i in input().split()]
	res.append('a' * 52)
	for elem in a:
		res.append(res[-1][:elem] + ('b' if res[-1][elem] == 'a' else 'a') * (52 - elem))
	for elem in res:
		print(elem)


def solve():
	n = int(input())
	A = list(map(int, input().split()))
	prev = 'a' * 200
	print(prev)
	for i in range(n):
		for j in range(A[i], 200):
			prev = prev[:j] + chr((ord(prev[j]) - ord('a') + 27) % 26 + ord('a')) + prev[j + 1:]
		print(prev)
for i in range(int(input())):
	solve()


for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s1 = ['a'] * 101
	s2 = s1.copy()
	c = ''.join(map(str, s1))
	for i in range(n):
		b = a[i]
		if i == 0:
			print(c)
		for j in range(b, 101):
			if s2[j] == 'a':
				s2[j] = 'b'
			else:
				s2[j] = 'a'
			d = ''.join(map(str, s2))
		print(d)


def main():
	for _ in range(int(input())):
		n = int(input())
		a = list(map(int, input().split()))
		ans = ['a' * 200] * 1
		for i in range(n):
			x = ans[-1]
			if x[a[i]] == 'a':
				x = x[:a[i]] + 'b' + x[a[i] + 1:]
			else:
				x = x[:a[i]] + 'a' + x[a[i] + 1:]
			ans.append(x)
		for v in ans:
			print(v)
main()


t = int(input())
for i in range(t):
	l = int(input())
	k = list(map(int, input().split()))
	maxi = max(k) + 1
	string1 = maxi * 'a'
	string2 = ''
	print(string1)
	for j in range(l):
		for q in range(maxi):
			if q < k[j]:
				string2 += string1[q]
			elif ord(string1[q]) >= 122:
				string2 += 'a'
			else:
				string2 += chr(ord(string1[q]) + 1)
		print(string2)
		string1 = string2
		string2 = ''


T = int(input())
for _ in range(T):
	N = int(input())
	A = list(map(int, input().split()))
	s = 'a' * 50
	print(s)
	for a in A:
		if a == 50:
			print(s)
			continue
		s = s[:a] + ('b' if s[a] == 'a' else 'a')
		s += 'a' * (50 - len(s))
		print(s)


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	s = ''
	for i in range(97, 123):
		s = s + chr(i)
	s = s * 2
	s = s + 'abcd'
	prev = s
	print(prev)
	for i in a:
		if i == 0:
			curr = prev[1] + prev[0] + prev[2:]
		else:
			curr = prev[0:i] + prev[i + 1:i - 1:-1] + prev[i + 2:]
		if curr != prev:
			print(curr)
		else:
			curr = prev[0:i] + prev[i + 2:i - 1:-1] + prev[i + 3:]
			print(curr)
		prev = curr


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	l = ''
	for i in range(max(a) + 1):
		l += 'a'
	print(l)
	for i in range(n):
		if l[a[i]] == 'z':
			x = 'a'
		else:
			x = chr(ord(l[a[i]]) + 1)
		l = l[:a[i]] + x + l[a[i] + 1:]
		print(l)


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
lcm = lambda x, y: x * y // gcd(x, y)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 0 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
sm = lambda x: (x ** 2 + x) // 2
N = 10 ** 9 + 7
for _ in range(I()):
	n = I()
	p = ['a'] * 100
	d = 'xy'
	print(*p, sep='')
	for i in R():
		if p[i] == d[0]:
			p[i] = d[1]
		else:
			p[i] = d[0]
		print(*p, sep='')


from sys import stdin, stdout
from math import gcd, ceil, sqrt
from collections import Counter
from bisect import bisect_left, bisect_right
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
s = 'abcdefghijklmnopqrstuvwxyz'
tc = ii1()
for _ in range(tc):
	n = ii1()
	arr = iia()
	res = []
	if arr[0] != 0:
		res.append('a' * arr[0])
	else:
		res.append('a')
	for i in range(1, n):
		if arr[i] != 0 and arr[i - 1] != 0:
			if arr[i] > arr[i - 1]:
				cur = res[-1][:arr[i - 1]]
				d = (s.index(res[-1][-1]) + 1) % 26
				cur += s[d] * (arr[i] - arr[i - 1])
				res.append(cur)
			else:
				res.append(res[-1][:arr[i - 1]])
		elif arr[i] == 0 and arr[i - 1] != 0:
			res.append(res[-1][:arr[i - 1]])
		elif arr[i] != 0 and arr[i - 1] == 0:
			if res[-1][0] == 'a':
				res.append('b' * arr[i])
			else:
				res.append('a' * arr[i])
		elif res[-1][0] == 'a':
			res.append('b')
		else:
			res.append('a')
	for i in res:
		print(i)
	if arr[-1] != 0:
		print(res[-1][:arr[-1]])
	else:
		print('z')


t = int(input())
while t:
	n = int(input())
	a = [int(x) for x in input().split()]
	maxi = max(a)
	if maxi != 0:
		first = 'a'
		filling = 'b'
		last = first * maxi
		print(last)
		for i in a:
			if i < maxi:
				change = last[i]
				if change == 'a':
					filling = 'b'
				else:
					filling = 'a'
			last = last[0:i] + filling * (maxi - i)
			print(last)
	else:
		first = 'a'
		second = 'b'
		for i in range(n + 1):
			print(first)
			(first, second) = (second, first)
	t -= 1


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	m = max(a)
	if m == 0:
		m = 10
	s = ['a' for i in range(m)]
	print(''.join(s))
	for i in range(n):
		if a[i] < m:
			if s[a[i]] == 'a':
				s[a[i]] = 'b'
			else:
				s[a[i]] = 'a'
		elif a[i] == 0:
			if s[0] == 'a':
				s[0] = 'b'
			else:
				s[0] = 'a'
		print(''.join(s))


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	count = ord('a')
	strings = []
	strings.append('a' * 200)
	for (i, j) in enumerate(a):
		s = list(strings[-1])
		strings.pop()
		si = list(s)
		si[j] = 'a' if s[j] == 'b' else 'b'
		strings.append(''.join(s))
		strings.append(''.join(si))
	for i in strings:
		print(i)


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def instr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())

def main():
	t = inp()
	for _ in range(t):
		n = inp()
		a = inlist()
		res = []
		p = 0
		res.append(chr(97 + p % 25))
		p += 1
		for i in range(n):
			lagbe = a[i]
			ase = len(res[i])
			deficit = lagbe - ase
			if lagbe == 0:
				res.append(chr(97 + p % 25))
				p += 1
			elif deficit > 0:
				curr = res[i] + chr(97 + p % 25) * deficit
				p += 1
				res[-1] = curr
				res.append(curr)
			else:
				temp = res[i]
				res.append(temp[:lagbe])
		res.append
		for r in res:
			print(r)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


def get_str(n, a):
	L = []
	m = max(a)
	if m == 0:
		L.append('a')
	else:
		L.append('a' * m)
	var = 98
	for i in range(n):
		x = a[i]
		s = L[i][:x] + chr(var)
		if len(s) < m:
			s = s + 'a' * (m - len(s))
		L.append(s)
		var += 1
		if var == 97 + 25:
			var = 98
	return L
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	L = get_str(n, a)
	for i in range(n + 1):
		print(L[i])


tests = int(input())
sol = []
while tests:
	tests -= 1
	g = []
	n = int(input())
	lst = list(map(int, input().split()))
	alfabet = 'qwertyuiopasdfghjklzxcvbnm'
	index = 0
	if lst[0]:
		string = alfabet[index] * lst[0]
	else:
		string = alfabet[index]
	g.append(string)
	delete = ''

	def increase():
		global index, delete
		index = (index + 1) % len(alfabet)
		if len(delete):
			if delete != alfabet[index]:
				pass
			else:
				while delete == alfabet[index]:
					index = (index + 1) % len(alfabet)
	for i in range(n - 1):
		size = max(1, lst[i + 1] - lst[i])
		string = g[i][:lst[i]]
		try:
			delete = g[i][lst[i]]
		except Exception as e:
			delete = ''
		increase()
		string += size * alfabet[index]
		g.append(string)
	size = 1
	string = g[n - 1][:lst[n - 1]]
	try:
		delete = g[n - 1][lst[n - 1]]
	except Exception as e:
		delete = ''
	increase()
	string += size * alfabet[index]
	g.append(string)
	sol.append(g)
for i in sol:
	for j in i:
		print(j)


def solve():
	n = int(input())
	arr = [int(v) for v in input().split()]
	mx = 100
	alpha = 'abcdefghijklmnopqrstuvwxyz'
	start = 0
	ans = [alpha[start] * mx]
	j = 1
	for i in range(n):
		j %= len(alpha)
		if not j:
			start += 1
			start %= len(alpha)
			j = start
		ans.append(ans[-1][:arr[i]])
		ans[-1] += alpha[j] * (mx - arr[i])
		j += 1
	for v in ans:
		print(v)
t = int(input())
for _ in range(t):
	solve()


for _ in range(int(input())):
	n = int(input())
	A = list(map(int, input().split()))
	s = 'a' * 200
	print(s)
	for i in range(n):
		s = s[:A[i]] + chr((ord(s[A[i]]) - 96) % 25 + 97) * (200 - A[i])
		print(s)


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		len_list = list(map(int, input().split()))
		len_max = max(len_list)
		s_list = []
		s_list.append('a' * (1 + len_max))
		for len_elem in len_list:
			s_list_last = s_list[-1]
			s_list.append(s_list_last[:len_elem] + chr(ord('a') + (1 + ord(s_list_last[len_elem]) - ord('a')) % 26) + s_list_last[len_elem + 1:])
		for elem in s_list:
			print(elem)
main()


for _ in range(int(input())):
	n = int(input())
	x = list(map(int, input().split()))
	mx = max(1, max(x))
	ant = 'a' * mx
	print(ant)
	for i in x:
		temp = ''
		for j in range(i):
			temp += ant[j]
		for j in range(i, mx):
			if ant[j] == 'a':
				temp += 'b'
			else:
				temp += 'a'
		print(temp)
		ant = temp


t = int(input())
while t > 0:
	n = int(input())
	list = [int(i) for i in input().split()]
	k = max(list)
	s = 'a' * (k + 1)
	print(s)
	for i in range(n):
		if s[list[i]] == 'a':
			s = s[:list[i]] + 'b' * (k - list[i] + 1)
		else:
			s = s[:list[i]] + 'a' * (k - list[i] + 1)
		print(s)
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	maxvalue = max(a)
	arr = ['a' * (maxvalue + 1)] * (n + 1)
	for (x, y) in enumerate(a):
		if arr[x][y] == 'b':
			temp = 'a'
		else:
			temp = 'b'
		arr[x + 1] = arr[x][:y] + temp + arr[x][y + 1:]
	print('\n'.join(arr))


from sys import stdin as cin
lmap = lambda f, v: list(map(f, v))

def find_strings(aa):
	N = max(aa) + 1
	s = 'a' * N
	yield s
	for a in aa:
		s = s[:a] + ('b' if s[a] == 'a' else 'a') + s[a + 1:]
		yield s

def main():
	t = int(next(cin).strip())
	for i in range(t):
		next(cin)
		aa = lmap(int, next(cin).strip().split())
		print('\n'.join(find_strings(aa)))
main()


def solve(n, l):
	strings = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
	pos = 0
	done = ['' for i in range(n + 1)]
	if l[0] != 0:
		done[0] = 'a' * l[0]
		done[1] = 'a' * l[0]
	else:
		done[0] = 'a'
		done[1] = 'b'
		pos = 2
	for i in range(1, n):
		if l[i] == 0:
			pos += 1
			done[i + 1] = strings[pos % 8]
			continue
		if l[i] <= l[i - 1]:
			done[i + 1] = done[i][:l[i]]
		else:
			pos += 1
			done[i + 1] = done[i]
			j = strings[pos % 8] * abs(min(len(done[i + 1]), l[i]) - max(len(done[i + 1]), l[i]))
			done[i + 1] += j
			done[i] += j
	return done
t = int(input())
for we in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	m = solve(n, l)
	for i in m:
		print(i)


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
inp = lambda : int(input())
strng = lambda : input().strip()
jn = lambda x, l: x.join(map(str, l))
strl = lambda : list(input().strip())
mul = lambda : map(int, input().strip().split())
mulf = lambda : map(float, input().strip().split())
seq = lambda : list(map(int, input().strip().split()))
ceil = lambda x: int(x) if x == int(x) else int(x) + 1
ceildiv = lambda x, d: x // d if x % d == 0 else x // d + 1
flush = lambda : stdout.flush()
stdstr = lambda : stdin.readline()
stdint = lambda : int(stdin.readline())
stdpr = lambda x: stdout.write(str(x))
stdarr = lambda : map(int, stdstr().split())
mod = 1000000007
char = {}
j = 0
for i in range(ord('a'), ord('z') + 1):
	char[j] = chr(i)
	j += 1
for _ in range(stdint()):
	n = stdint()
	arr = list(stdarr())
	res = []
	m = max(arr)
	if m == 0:
		for i in range(n + 1):
			print(char[i % 26])
		continue
	res.append('a' * m)
	j = 1
	for i in range(n):
		if arr[i] == m:
			res.append(res[-1])
			continue
		n = res[-1][:arr[i]]
		n += char[j % 26] * (m - arr[i])
		res.append(n)
		j += 1
	for i in res:
		print(i)


t = int(input())
while t:
	t = t - 1
	n = int(input())
	a = list(map(int, input().split()))
	s = ['a' for i in range(60)]
	for j in s:
		print(j, end='')
	print()
	for i in range(1, n + 1):
		x = a[i - 1]
		s[x] = chr(ord(s[x]) + 1)
		if ord(s[x]) == ord('z') + 1:
			s[x] = 'a'
		for j in s:
			print(j, end='')
		print()


t = int(input())
for tt in range(t):
	n = int(input())
	x = list(map(int, input().split()))
	b = ['a'] * 101
	a = list()
	print(''.join(b))
	for i in range(0, len(x)):
		if b[x[i]] == 'b':
			b[x[i]] = 'x'
		else:
			b[x[i]] = 'b'
		print(''.join(b))


from math import log2, ceil, floor
from collections import defaultdict, OrderedDict, Counter, deque
from heapq import heappush, heappop, heapify
from sys import argv, getsizeof, path, setrecursionlimit
import re

def inp():
	return input()

def list_inp():
	return list(map(int, input().split()))

def map_inp():
	return map(int, input().split())

def int_inp():
	return int(input())

def float_int():
	return float(input())

def isprime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
for _ in range(int_inp()):
	n = int_inp()
	a = list_inp()
	print(51 * 'z')
	s = ''
	t = []
	t.append(51 * 'z')
	for i in range(n):
		s = t[-1]
		l = list(s)
		if l[a[i]] == 'z':
			l[a[i]] = 'y'
		else:
			l[a[i]] = 'z'
		s = ''
		s = s.join(l)
		t.append(s)
		print(s)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	m = max(a)
	x = ['a'] * (m + 1)
	for r in x:
		print(r, end='')
	print()
	for i in range(n):
		if x[a[i]] == 'b':
			x[a[i]] = 'c'
		else:
			x[a[i]] = 'b'
		for r in x:
			print(r, end='')
		print()


from sys import stdin, stdout
from math import *
from heapq import *
from collections import *

def main():
	ntest = int(stdin.readline())
	for testcase in range(ntest):
		n = int(stdin.readline())
		a = [int(x) for x in stdin.readline().strip().split()]
		res = ['a'] * 200
		stdout.write('%s\n' % ''.join(res))
		for l in a:
			res[l] = 'a' if res[l] == 'b' else 'b'
			stdout.write('%s\n' % ''.join(res))
	return 0
main()


from sys import stdin

def inp():
	return stdin.buffer.readline().rstrip().decode('utf8')

def itg():
	return int(stdin.buffer.readline())

def mpint():
	return map(int, stdin.buffer.readline().split())

def other_char(c):
	return 'b' if c == 'a' else 'a'
for case in range(itg()):
	n = itg()
	lcp = tuple(mpint())
	ans = [[] for _ in range(n + 1)]
	if lcp[0] == 0:
		ans[0] = ['a']
		ans[1] = ['b']
	else:
		ans[0] = ['a'] * lcp[0]
		ans[1] = ['a'] * lcp[0]
	for i in range(1, n):
		if lcp[i] == 0:
			ans[i + 1] = [other_char(ans[i][0])]
		elif lcp[i] <= len(ans[i]):
			ans[i + 1] = ans[i][:lcp[i]]
		else:
			add = ['a'] * (lcp[i] - len(ans[i]))
			if len(ans[i]) < len(ans[i - 1]):
				add[0] = other_char(ans[i - 1][len(ans[i])])
			else:
				pass
			ans[i].extend(add)
			ans[i + 1] = ans[i].copy()
	for s in ans:
		print(''.join(s))


import sys
import math
import collections
input = sys.stdin.readline
cases = int(input())
for case in range(cases):
	n = int(input())
	a = [int(x) for x in input().split()]
	ans = []
	s1 = 'a' * 200
	ans.append(s1)
	for i in range(n):
		s = ans[i][0:a[i]:1]
		k = 200 - len(s)
		if ans[i][a[i]] == 'a':
			s += 'b' * k
		else:
			s += 'a' * k
		ans.append(s)
	for i in range(len(ans)):
		print(ans[i])


from math import inf as inf
from math import *
from collections import *
import sys
import os
input = sys.stdin.readline
t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	re = []
	r = 'a' * (a[0] + 100)
	if a[0] == 0:
		r = 'a' * 100
	re.append(r)
	for i in a:
		x = re[-1][:i]
		v = chr(97)
		i1 = 0
		if x == '':
			while v == re[-1][0]:
				v = chr(97 + i1 % 26)
				i1 += 1
		else:
			while v == re[-1][i]:
				v = chr(97 + i1 % 26)
				i1 += 1
		x = x + v * (100 - len(x))
		re.append(x)
	for i in re:
		print(i)


tc = int(input())
while tc > 0:
	tc -= 1
	n = int(input())
	a = list(map(int, input().rstrip().split()))
	s = 'abcdefghijklmnopqrstuvwcwzabcdefghijklmnopqrstuvwcwz'
	print(s)
	i = 0
	while i < n:
		tp = a[i]
		print(s[:tp], end='')
		if s[tp] != 'c':
			print('c', end='')
		else:
			print('w', end='')
		print(s[tp + 1:])
		if s[tp] != 'c':
			s = s[:tp] + 'c' + s[tp + 1:]
		else:
			s = s[:tp] + 'w' + s[tp + 1:]
		i += 1


from sys import stdin
input = stdin.readline
from heapq import heapify, heappush, heappop, heappushpop
from collections import defaultdict as dd, deque as dq, Counter as C
from math import factorial as f, ceil, gcd, sqrt, log
from bisect import bisect_left as bl, bisect_right as br
from itertools import combinations as c, permutations as p
from math import factorial as f, ceil, gcd, sqrt, log
mp = lambda : map(int, input().split())
it = lambda : int(input())
ls = lambda : list(input().strip())
mt = lambda r: [list(mp()) for _ in range(r)]
lcm = lambda a, b: a * b // gcd(a, b)

def fibo_n(n):
	return ((1 + sqrt(5)) / 2) ** n / sqrt(5)
mod = 1000000007
for _ in range(it()):
	a = it()
	b = list(mp())
	v = ['a'] * 200
	print(''.join(v))
	for i in b:
		if v[i] == 'a':
			v[i] = 'b'
		else:
			v[i] = 'a'
		print(''.join(v))


test = int(input())
for _ in range(test):
	n = int(input())
	arr = list(map(int, input().split()))
	l = max(arr)
	ans = [[] for i in range(n + 1)]
	for i in range(1, l + 2):
		ans[0].append('a')
		for j in range(1, n + 1):
			if arr[j - 1] == 0:
				if ans[j - 1][-1] == 'a':
					ans[j].append('b')
				else:
					ans[j].append('a')
			else:
				arr[j - 1] -= 1
				ans[j].append(ans[j - 1][-1])
	for ar in ans:
		print(''.join(ar))


t = int(input())
for h in range(t):
	len_1 = int(input())
	list_1 = list(map(int, input().split()))
	x = 200 * 'b'
	lis_new = []
	for i in range(len_1 + 1):
		lis_new.append(x)
	h = 0
	for j in range(len_1):
		str_lis = list(lis_new[j])
		if str_lis[list_1[h]] == 'a':
			str_lis[list_1[h]] = 'b'
		else:
			str_lis[list_1[h]] = 'a'
		lis_new[j + 1] = ''.join(map(str, str_lis))
		h += 1
	for i in lis_new:
		print(i)


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	start = 'a'
	alpha = []
	for i in range(26):
		alpha.append(start)
		start = chr(ord(start) + 1)
	alphar = alpha.copy()
	alphar.reverse()
	d = dict(zip(alpha, alphar))
	m = max(a)
	if m == 0:
		ans = ['a']
		index = 0
		for i in range(n):
			ans.append(d[ans[index]])
			index += 1
	else:
		ans = ['a' * m]
		index = 0
		for i in range(n):
			string = ans[index][0:a[i]]
			for j in range(a[i], m):
				string += d[ans[index][j]]
			index += 1
			ans.append(string)
	for i in range(len(ans)):
		print(ans[i])


import os
import sys
from io import BytesIO, IOBase
import math
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	a = ['' for i in range(len(l) + 1)]
	c = 99
	lt = 'abcdefghijklmnopqrstuvwxyz'
	a[0] = 'a' * l[0] + 'b'
	print(a[0])
	s = list()
	for i in range(1, n + 1):
		a[i] = a[i - 1][:l[i - 1]] + chr(c) * 100
		c += 1
		if c > 122:
			c = 99
		print(a[i])


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	str = []
	for i in range(51):
		str.append('a')
	for s in str:
		print(s, end='')
	print('')
	for i in range(n):
		if str[a[i]] != 'z':
			str[a[i]] = chr(ord(str[a[i]]) + 1)
		else:
			str[a[i]] = chr(ord(str[a[i]]) - 1)
		for s in str:
			print(s, end='')
		print('')


import sys
import math
from collections import defaultdict
import heapq
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	ans = [[0 for _ in range(100)] for x in range(n + 1)]
	for i in range(100):
		ans[0][i] = 'a'
	a = list(map(int, sys.stdin.readline().split()))
	for i in range(n):
		for j in range(a[i]):
			ans[i + 1][j] = ans[i][j]
		for j in range(a[i], 100):
			ans[i + 1][j] = chr((ord(ans[i][j]) + 1) % 26 + 97)
	for i in range(n + 1):
		print(''.join((x for x in ans[i])))


for _ in range(int(input())):
	n = int(input())
	lis = list(map(int, input().split()))
	s = []
	m = max(lis)
	if m == 0:
		for i in range(n + 1):
			if i % 2 == 0:
				print('a')
			else:
				print('b')
		continue
	for i in range(n + 1):
		s.append(['a'] * m)
	for i in range(1, n + 1):
		for j in range(lis[i - 1]):
			s[i][j] = s[i - 1][j]
		try:
			if s[i - 1][lis[i - 1]] == 'a':
				f = 'b'
			else:
				f = 'a'
		except:
			continue
		for j in range(lis[i - 1], m):
			s[i][j] = f
	for i in s:
		print(''.join(i))


import string
T = int(input())
for t in range(T):
	n = int(input())
	A = list(map(int, input().split()))
	j = 0
	char = string.ascii_letters[j]
	curr = 'z' + char * A[0]
	prev = curr
	print(curr)
	for i in range(n - 1):
		prev = curr
		if A[i] == 0:
			j = (j + 1) % 26
			char = string.ascii_letters[j]
			curr = char
		else:
			curr = prev[:A[i]]
		if A[i + 1] > A[i]:
			j = (j + 1) % 26
			char = string.ascii_letters[j]
			curr += char * (A[i + 1] - A[i])
		print(curr)
	if A[n - 1] == 0:
		j = (j + 1) % 26
		char = string.ascii_letters[j]
		print(char)
	else:
		print(curr[:A[n - 1]])


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = 'a' * 100
	print(s)
	ls = list(s)
	for i in l:
		if ls[i] == 'a':
			ls[i] = 'b'
		else:
			ls[i] = 'a'
		s1 = ''.join(ls)
		print(s1)


for cas in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	first = 'a' * a[0] + 'b' * (50 - a[0])
	s = [first, 'a' * 50]
	for i in range(1, n):
		k = a[i]
		x = s[i][:k]
		for j in range(k, 50):
			x += 'b' if s[i][j] == 'a' else 'a'
		s.append(x)
	for x in s:
		print(x)


n = int(input())
for _ in range(n):
	k = int(input())
	a = list(map(int, input().split()))
	prev = 'a' * max(max(a), 1)
	print(prev)
	for i in a:
		if i >= len(prev):
			prev += 'a' * (i - len(prev))
		else:
			prev = prev[:i] + ('a' if prev[i] == 'b' else 'b') + (prev[i + 1:] if i + 1 < len(prev) else '')
		print(prev)


import sys
t = int(sys.stdin.readline())
ch = 'bcd'
while t:
	t -= 1
	n = int(sys.stdin.readline())
	k = list(map(int, sys.stdin.readline().split()))
	x = 2
	if k[0] == 0:
		s = 'a'
	else:
		s = 'a' * k[0]
	print(s)
	i = 0
	while i < n - 1:
		p = max(k[i], k[i + 1])
		if not p:
			p = 1
		c = 0
		s1 = ''
		while c < p:
			if c == k[i]:
				x += 1
				if c >= len(s):
					q = 96
				else:
					q = ord(s[c])
				if q <= 97:
					q += 1
				else:
					q -= 1
				s1 = s1 + chr(q) * (p - k[i])
				break
			s1 = s1 + s[c]
			c += 1
		s = s1
		print(s)
		i += 1
	if k[-1]:
		for i in range(k[-1]):
			print(s[i], end='')
		print()
	else:
		q = ord(s[0])
		if q == 97:
			q += 1
		else:
			q -= 1
		print(chr(q))


for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	s = ['a' * (max(a[:]) + 3) for _ in range(n + 1)]
	for i in range(n):
		if s[i][a[i]] == 'a':
			cos = 'b'
		else:
			cos = 'a'
		s[i + 1] = s[i][:a[i]] + cos + s[i - 1][a[i] + 1:]
	for z in s:
		print(z)


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
ip = lambda : int(stdin.readline())
inp = lambda : map(int, stdin.readline().split())

def solve(s):
	ch = 'abcdefghijklmnopqrstuvwxyz'
	for i in ch:
		if i != s:
			break
	return i
t = ip()
for _ in range(t):
	n = ip()
	arr = list(inp())
	st = 'a' * 100
	print(st)
	k = 0
	for i in range(n):
		ch = st[:arr[i]]
		ch += solve(st[arr[i]])
		if k == 0:
			ch = ch + (100 - len(ch)) * 'b'
		else:
			ch = ch + (100 - len(ch)) * 'c'
		st = ch
		k ^= 1
		print(st)


def a(c):
	if c != 'z':
		return chr(ord(c) + 1)
	else:
		return 'a'

def b(ca):
	ca1 = []
	for i in range(len(ca)):
		ca1.append(a(ca[i]))
	return ca1
n = int(input())
for i in range(n):
	alph = list('abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghi')
	m = int(input())
	s = input().split(' ')
	b = []
	for c in s:
		b.append(int(c))
	for j in range(m):
		ca = []
		for k in range(len(alph)):
			ca.append(alph[k])
		for k in range(b[j], len(alph), 1):
			alph[k] = a(alph[k])
		print(''.join(ca))
	print(''.join(alph))


import sys

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		mx = max(a)
		ans = ['a' * (mx + 1)] * (n + 1)
		for (i, x) in enumerate(a):
			who = 'a' if ans[i][x] == 'b' else 'b'
			ans[i + 1] = ans[i][:x] + who + ans[i][x + 1:]
		print('\n'.join(ans))
main()


for _ in range(int(input())):
	n = int(input())
	s = ['a'] * 60
	arr = list(map(int, input().split()))
	print(''.join(s))
	for i in arr:
		if s[i] == 'b':
			s[i] = 'a'
		else:
			s[i] = 'b'
		print(''.join(s))


def change(y):
	y1 = ''
	for i in y:
		if i == 'a':
			y1 += 'b'
		else:
			y1 += 'a'
	return y1
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	l = 'a' * 200
	print(l)
	for i in range(n):
		x = ''
		x += l[:a[i]]
		y = l[a[i]:]
		x += change(y)
		l = x
		print(l)


t = int(input())
while t:
	n = int(input())
	l = list(map(int, input().split()))
	fir = 'a' * 200
	prv = None
	print(fir)
	for i in l:
		prv = fir[:i]
		if fir[i] == 'z':
			prv = prv + 'a' * (200 - i)
		else:
			prv = prv + 'z' * (200 - i)
		print(prv)
		fir = prv
	t = t - 1


from string import ascii_lowercase
t = int(input())
for i in range(t):
	n = int(input())
	a = list((int(num) for num in input().split()))
	l = ['a'] * 51
	print(''.join(l))
	for z in range(0, len(a)):
		for x in ascii_lowercase:
			if x != l[a[z]]:
				c = x
				break
		l2 = l[:a[z]] + [c] * (51 - a[z])
		print(''.join(l2))
		l = l2


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s0 = 'a' * 51
	print(s0)
	for i in range(n):
		s1 = s0[0:a[i]] + ''.join(['a' if s0[j] == 'b' else 'b' for j in range(a[i], len(s0))])
		print(s1)
		s0 = s1


inp = lambda : map(int, input().split(' '))
(t,) = inp()
for _ in range(t):
	(n,) = inp()
	a = list(inp())
	res = []
	str1 = 'a' * 51
	print(str1)
	for i in a:
		str1 = list(str1)
		str1[i] = 'b' if str1[i] == 'a' else 'a'
		print(''.join(str1))


for i in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	s = []
	s.append('x' * 200)
	r = 'x' * 200
	for i in a:
		z = r
		if r[i] == 'x':
			z = z[:i] + 'y' + z[i + 1:]
		else:
			z = z[:i] + 'x' + z[i + 1:]
		r = z
		s.append(z)
	for q in s:
		print(q)


t = int(input())
for i in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	m = max(ar)
	ans = ['a' * (m + 1)] * (n + 1)
	for (u, v) in enumerate(ar):
		who = 'a' if ans[u][v] == 'b' else 'b'
		ans[u + 1] = ans[u][:v] + who + ans[u][v + 1:]
	print('\n'.join(ans))


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve():
	ans = 'a' * 51
	n = int(inp())
	a = lis()
	print(ans)
	cnt = 0
	for i in range(n):
		temp = ans[:a[i]]
		if ans[a[i]] == 'a':
			temp += 'b' * (51 - a[i])
		else:
			temp += 'a' * (51 - a[i])
		print(temp)
		ans = temp
testcase(int(inp()))


from collections import defaultdict, deque, Counter, OrderedDict
import heapq
import sys
import string
import random
for x in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	temp_str = ['a' for x in range(10)]
	ans = [['a' for x in range(200)] for y in range(n + 1)]
	chars = list(string.ascii_lowercase)
	i = 0
	for x in li:
		for y in range(x):
			ans[i + 1][y] = ans[i][y]
		ff = ord('a') + (ord(ans[i][x]) - ord('a') + 1) % 26
		ans[i + 1][x] = chr(ff)
		i += 1
	for x in ans:
		print(''.join(x))


def nxt(ch):
	if ch == 'z':
		return 'a'
	return chr(ord(ch) + 1)
ans = []
for _ in range(int(input())):
	n = int(input())
	u = list(map(int, input().split()))
	s = ['a']
	for i in range(51):
		s.append(nxt(s[-1]))
	ans.append(''.join(s))
	for i in range(n):
		s[u[i]] = nxt(s[u[i]])
		ans.append(''.join(s))
print('\n'.join(ans))


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0, hi=None):
	if hi == None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
size = 100
for _ in range(int(input())):
	n = int(input())
	a = int_array()
	zf = 0
	ans = []
	ans.append(''.join(['a' for __ in range(size)]))
	for i in range(n):
		this = []
		for j in range(size):
			if j < a[i]:
				this.append(ans[i][j])
			elif j == a[i]:
				alps = {chr(i) for i in range(97, 97 + 26)}
				alps.remove(ans[i][j])
				x = list(alps)
				this.append(x[0])
			else:
				this.append(ans[i][j])
		ans.append(''.join(this))
	for i in ans:
		print(i)


import sys
alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
fast_reader = sys.stdin.readline
fast_writer = sys.stdout.write

def input():
	return fast_reader().strip()

def print(*argv):
	fast_writer(' '.join((str(i) for i in argv)))
	fast_writer('\n')
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if sum(a) == 0:
		for i in range(n + 1):
			print(alpha[i % 26])
		continue
	l = []
	for i in range(n + 1):
		l.append(list('a' * 200))
	k = 0
	for j in range(n):
		temp = a[j]
		f = l[j][:]
		s = l[j][:]
		for i in range(temp, 200):
			s[i] = alpha[(k + 1) % 26]
		c = 0
		for i in range(200):
			if f[i] == s[i]:
				c += 1
			else:
				break
		if c > temp:
			pp = 0
			while True:
				if alpha[pp] != s[temp]:
					s[temp] = alpha[pp]
					break
				else:
					pp += 1
		l[j] = f[:]
		l[j + 1] = s[:]
		k += 1
	for i in range(len(l)):
		temp = ''
		for j in l[i]:
			temp += j
		print(temp)


def solution(arr):
	n = len(arr) + 1
	mx = max(arr) + 1
	ans = ['a' * mx] * n
	for i in range(len(arr)):
		v = arr[i]
		if ans[i][v] == 'b':
			chra = 'a'
		else:
			chra = 'b'
		ans[i + 1] = ans[i][:v] + chra + ans[i][v + 1:]
	return ans
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	ans = solution(arr)
	for i in ans:
		print(i)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	leno = max(a) + 1
	s = []
	s.append(leno * 'a')
	for i in range(n):
		c = s[i][a[i]]
		if c == 'z':
			c = 'a'
		else:
			c = chr(ord(c) + 1)
		s.append(s[i][0:a[i]] + (leno - a[i]) * c)
	for i in s:
		print(i)


from sys import stdin
input = stdin.readline
T = int(input())
for case in range(T):
	n = int(input())
	a_list = [*map(int, input().split())]
	Ans = ['a' * 60]
	for i in range(n):
		tmp = Ans[i][:a_list[i]]
		if a_list[i] >= len(Ans[i]):
			tmp2 = ''
		elif Ans[i][a_list[i]] == 'b':
			tmp2 = 'a' * (60 - a_list[i])
		else:
			tmp2 = 'b' * (60 - a_list[i])
		tmp += tmp2
		Ans.append(tmp)
	for row in Ans:
		print(row)


import sys
input = sys.stdin.readline
read = lambda : map(int, input().split())
read_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(councils, a, k):
	summ = 0
	for x in a:
		summ += min(x, councils)
	return summ // councils >= k
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
import bisect as bis
import random
import sys

def solve():
	n = int(input())
	a = list(read())
	ans = 'a' * 200
	print(ans)
	for i in range(n):
		if ans[a[i]] == 'b':
			z = 'a'
		elif ans[a[i]] == 'a':
			z = 'b'
		c = ans[:a[i]] + z + ans[a[i] + 1:]
		ans = c
		print(ans)
for _ in range(int(input())):
	solve()


import string
import random

def main():
	t = int(input())
	for case in range(t):
		n = int(input())
		ar = [int(x) for x in input().split()]
		l = max(ar) + 1
		s = ''
		for i in range(l):
			s += random.choice(string.ascii_lowercase)
		res = [s]
		for i in range(n):
			char = 'a'
			while char == s[ar[i]]:
				char = random.choice(string.ascii_lowercase)
			s = s[:ar[i]] + char + s[ar[i] + 1:]
			res.append(s)
		for s in res:
			print(s)
main()


import sys, math
from sys import stdin, stdout
mod = int(1000000000.0 + 7)
from statistics import mode
from collections import deque, defaultdict
from math import ceil, floor, inf, factorial, gcd, log2
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()

def lcm(a, b):
	return a * b // gcd(a, b)

def setbits(n):
	return bin(n).count('1')

def resetbits(n):
	return bin(n).count('0')

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr_p(n, r, p):
	(num, den) = (1, 1)
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * modinv(den, p) % p

def isPrime(num):
	if num <= 1:
		return False
	if num == 2 or n == 3:
		return True
	if num % 2 == 0 or num % 3 == 0:
		return False
	for i in range(5, int(num ** 0.5) + 1, 6):
		if num % i == 0 or num % (i + 2) == 0:
			return False
	return True

def bin_search(arr, low, high, val):
	while low <= high:
		mid = low + (high - low) // 2
		if arr[mid] == val:
			return mid
		elif arr[mid] < val:
			low = mid + 1
		else:
			high = mid - 1
	return -1

def sumofdigit(num):
	count = 0
	while num:
		count += num % 10
		num //= 10
	return count

def make_dic(arr):
	freq = {}
	for val in arr:
		freq[val] = freq[val] + 1 if val in freq else 1
	return freq

def inputmatrix():
	(r, c) = iia()
	mat = [0] * r
	for i in range(r):
		mat[i] = iia()
	return mat

def prefix_sum(n, arr):
	for i in range(1, n):
		arr[i] += arr[i - 1]
	return arr

def binomial(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0

def divisors(n):
	res = []
	for i in range(1, ceil(sqrt(n)) + 1):
		if n % i == 0:
			if i == n // i:
				res.append(i)
			else:
				res.append(i)
				res.append(n // i)
	return res
for _ in range(ii1()):
	n = ii1()
	arr = iia()
	st = 'a' * 200
	result = [st]
	prev = st
	for i in range(n):
		new_st = prev
		opposite = prev[arr[i]]
		if opposite == 'a':
			opposite = 'b'
		else:
			opposite = 'a'
		new_st = prev[:arr[i]] + opposite * (200 - arr[i])
		prev = new_st
		result.append(new_st)
	for st in result:
		print(st)


t = int(input())
for jack in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	u = max(a) + 1
	last = 'a' * a[0] + 'z' * (u - a[0])
	print(last)
	for i in range(n):
		v = chr(ord('a') + (ord(last[a[i]]) - ord('a') + 1) % 26)
		last = last[:a[i]] + v * (u - a[i])
		print(last)


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	length = max(arr) + 1
	output = ['a' * length]
	for i in arr:
		if output[-1][i] == 'b':
			char = 'a'
		else:
			char = 'b'
		output.append(output[-1][:i] + char * (length - i))
	for i in output:
		print(i)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	a = max(l) + 1
	(s, l1) = ('a' * a, 97)
	la = []
	if l[0] == 0:
		la.append(s[0:1])
	else:
		la.append(s[0:l[0]])
	for i in range(n - 1):
		a1 = s[0:l[i]]
		if l[i] < l[i + 1]:
			if l1 == 122:
				l1 = 96
			l1 += 1
			s = s[0:l[i]] + chr(l1) * (a - l[i])
			a1 = s[0:l[i + 1]]
		if a1 == '':
			if l1 == 122:
				l1 = 96
			l1 += 1
			la.append(chr(l1))
		else:
			la.append(a1)
	if s[0:l[-1]] == '':
		if l1 == 122:
			l1 = 96
		l1 += 1
		la.append(chr(l1))
	else:
		la.append(s[0:l[-1]])
	for i in la:
		print(i)


t = int(input())

def another(c):
	return 'b' if c == 'a' else 'a'
for i in range(t):
	n = int(input())
	a = [int(x) for x in input().split(' ')]
	s = ['a'] * 60
	print(''.join(s))
	for x in a:
		s[x] = another(s[x])
		print(''.join(s))


string = ['a'] * 52
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split(' ')))
	print(''.join(string))
	for i in l:
		asc = ord(string[i]) + 1
		if asc >= 122:
			asc = 97
		string[i] = chr(asc)
		print(''.join(string))


t = int(input())
while t > 0:
	n = int(input())
	l = list(map(int, input().split()))
	size = max(l)
	if size == 0:
		temp = 'a'
		for i in range(n + 1):
			print(temp)
			if temp == 'a':
				temp = 'b'
			else:
				temp = 'a'
	else:
		c = size
		ans = []
		char = 97
		while c > 0:
			if char <= 122:
				ans.append(chr(char))
				char += 1
				c -= 1
			else:
				char = 97
		if char == 123:
			change = 'a'
		else:
			change = chr(char)
		print(''.join(map(str, ans)))
		for i in l:
			if i == size:
				print(''.join(map(str, ans)))
			elif i < size:
				temp = ans[i]
				ans[i] = change
				print(''.join(map(str, ans)))
				change = temp
	t -= 1


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = list()
	s.append('a' * 50)
	print(s[0])
	for i in range(n):
		print(s[-1][0:a[i]] + (50 - a[i]) * chr(98 + i % 23))
		s.append(s[-1][0:a[i]] + (50 - a[i]) * chr(98 + i % 23))


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def pre(s):
	n = len(s)
	pi = [0] * n
	for i in range(1, n):
		j = pi[i - 1]
		while j and s[i] != s[j]:
			j = pi[j - 1]
		if s[i] == s[j]:
			j += 1
		pi[i] = j
	return pi

def prod(a):
	ans = 1
	for each in a:
		ans = ans * each
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if True else 1):
	n = int(input())
	a = list(map(int, input().split()))
	ans = ['a' * 100]
	for i in range(n):
		ans += [ans[-1][:a[i]] + chr(ord(ans[-1][a[i]]) + 1) if ans[-1][a[i]] != 'z' else 'a']
		ans[-1] = ans[-1] + 'a' * (100 - len(ans[-1]))
	for each in ans:
		print(each)


T = int(input())
for _ in range(0, T):
	n = int(input())
	s = [int(x) for x in input().split()]
	ln = [s[0]]
	for i in range(1, len(s)):
		mx = max(s[i], s[i - 1])
		ln.append(mx)
	ln.append(s[-1])
	ans = []
	st = 'a' * s[0]
	if len(st) == 0:
		st = 'a'
	ans.append(st)
	c = 1
	for i in range(1, len(s)):
		tt = st[:s[i - 1]]
		if len(tt) < s[i]:
			tt = tt + chr(c + 97) * (s[i] - len(tt))
			c = (c + 1) % 26
			if c == 0:
				c = (c + 1) % 26
		if len(tt) == 0:
			tt = chr(c + 97)
			c = (c + 1) % 26
			if c == 0:
				c = (c + 1) % 26
		ans.append(tt)
		st = tt
	tt = st[:s[-1]]
	if len(tt) == 0:
		tt = chr(c + 97)
		c = (c + 1) % 26
		if c == 0:
			c = (c + 1) % 26
	ans.append(tt)
	for i in range(0, len(ans)):
		print(ans[i])


from sys import stdout, stdin
t = int(input())

def g(c):
	return chr(max(97, (ord(c) + 1) % (97 + 26)))
for _ in range(t):
	n = int(input())
	a = list(map(int, stdin.readline().split()))
	ans = ['' for i in range(n + 1)]
	i = 0
	while len(ans[0]) != 200:
		ans[0] += chr(97 + i)
		i += 1
		i %= 26
	for i in range(n):
		for j in range(a[i]):
			ans[i + 1] += ans[i][j]
		if a[i] != 200:
			ans[i + 1] += g(ans[i][a[i]])
		ans[i + 1] += ans[i][a[i] + 1:]
	for i in ans:
		stdout.write(i + '\n')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	h = {'c': 3, 'd': 4, 'q': 17, 'k': 11, 'u': 21, 'j': 10, 'f': 6, 'w': 23, 'p': 16, 't': 20, 'a': 1, 'x': 24, 'r': 18, 'y': 25, 'e': 5, 'l': 12, 'v': 22, 'z': 26, 'i': 9, 'n': 14, 's': 19, 'g': 7, 'b': 2, 'm': 13, 'h': 8, 'o': 15}
	mp = {1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: 'e', 6: 'f', 7: 'g', 8: 'h', 9: 'i', 10: 'j', 11: 'k', 12: 'l', 13: 'm', 14: 'n', 15: 'o', 16: 'p', 17: 'q', 18: 'r', 19: 's', 20: 't', 21: 'u', 22: 'v', 23: 'w', 24: 'x', 25: 'y', 26: 'z'}
	st = 'a' * 200
	si = ''
	print(st)
	for i in range(n):
		si = st[:a[i]] + mp[h[st[a[i]]] % 26 + 1] * (200 - a[i])
		print(si)
		st = si


def f(s):
	if s == 'a':
		return 'b'
	return 'a'
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = 'a' * (max(a) + 1)
	print(s)
	for i in range(n):
		s = s[:a[i]] + f(s[a[i]]) + s[a[i] + 1:]
		print(s)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	c = 'a'
	ans = [list(c * arr[0])]
	if arr[0] == 0:
		ans[0].append(c)
	for i in range(n):
		if arr[i] == 0:
			c = chr(ord(c) + 1)
			if c == '{':
				c = 'a'
			ans.append([c])
			continue
		k = ans[len(ans) - 1][:]
		if len(k) < arr[i]:
			c = chr(ord(c) + 1)
			if c == '{':
				c = 'a'
			for _ in range(arr[i] - len(k)):
				k.append(c)
			ans[len(ans) - 1] = k[:]
		else:
			k = k[:arr[i]]
		ans.append(k)
	for i in range(n + 1):
		print(''.join(ans[i]))


test = int(input())
for _ in range(test):
	n = int(input())
	arr = list(map(int, input().split()))
	req = max(arr)
	ans = ['a' * (req + 1)] * (n + 1)
	for (i, x) in enumerate(arr):
		who = 'a' if ans[i][x] == 'b' else 'b'
		ans[i + 1] = ans[i][:x] + who + ans[i][x + 1:]
	print('\n'.join(ans))


from sys import stdin
input = stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().rstrip().split(' ')))
	prev = 0
	cur = ['a'] * 200
	curOrd = 0
	for i in range(n):
		print(''.join(cur))
		for j in range(200 - arr[i]):
			cur[arr[i] + j] = chr(97 + (ord(cur[arr[i] + j]) - 97 + 1) % 26)
	print(''.join(cur))


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
for _ in range(INT()):
	N = INT()
	A = LIST()
	MX = 57
	ans = ['a' * MX]
	for a in A:
		if ans[-1][a] == 'a':
			ans.append(ans[-1][:a] + 'b' * (MX - a))
		else:
			ans.append(ans[-1][:a] + 'a' * (MX - a))
	for s in ans:
		print(s)


def makeOutput(alems, nelem):
	orig = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'
	es = 'eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'
	cur = orig
	print(cur)
	for chg in alems:
		if cur[chg] == 'z':
			cur = cur[0:chg]
			cur += es
		else:
			cur = cur[0:chg]
			cur += orig
		print(cur)
numTestCases = int(input())
for _ in range(numTestCases):
	numelements = int(input())
	aelems = input()
	aelems = aelems.split()
	aelems = list(map(int, aelems))
	makeOutput(aelems, numelements)


import string
import random
t = input()
t = int(t)
while t > 0:
	n = int(input())
	a = list(map(int, input().strip().split()))[:n]
	alphabet = string.ascii_lowercase
	test_list = list(alphabet)
	ans = []
	start = 'fkbmlhfplstlnxggebayfkbmlhfplstlnxggebaytlnxggebaybay'
	ans.append(start)
	for (i, val) in enumerate(a):
		cha = ans[-1]
		ch = cha[val]
		res = random.choice([ele for ele in test_list if ele != ch])
		new = str(cha[:val]) + str(res) + str(cha[val + 1:])
		ans.append(new)
	for i in ans:
		print(i)
	t -= 1


def main():
	n = int(input())
	for i in range(n):
		solve()

def solve():
	n = int(input())
	arr = list(map(int, input().split()))
	high = max(max(arr), 2)
	result = ['a' * high]
	letter = 'b'
	index = 1
	mixer = 'z'
	suffix = mixer * high
	while index < len(arr) + 1:
		current = result[len(result) - 1][:arr[index - 1]]
		if len(current) != high:
			if result[len(result) - 1][len(current)] == 'a':
				current += 'b'
			else:
				current += 'a'
		if len(current) < high:
			current += suffix
			if mixer == 'z':
				mixer = 'y'
			else:
				mixer = 'z'
			suffix = mixer * high
		result.append(current)
		index += 1
	for word in result:
		print(word)
main()


t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	strTemplate = ['a'] * 52
	for l in a:
		print(''.join(strTemplate))
		c = strTemplate[l]
		if c == 'a':
			c2 = 'b'
		else:
			c2 = 'a'
		strTemplate[l] = c2
	print(''.join(strTemplate))


t = int(input())
lol = 'qwertyuioplkjhgfdsazxcvbnm'
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	s = 200 * 'a'
	print(s)
	for i in arr:
		s2 = s[:i]
		s2 += ''.join([lol[(lol.index(ele) + 1) % 26] for ele in s[i:]])
		print(s2)
		s = s2


import sys
from collections import defaultdict as dd
from collections import Counter as cc
from queue import Queue
import math
import itertools
try:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
except:
	pass
input = lambda : sys.stdin.buffer.readline().rstrip()
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	r = max(a) + 1
	s = [['a'] * r for i in range(n + 1)]
	w = 'ab'
	for i in range(n):
		for j in range(a[i]):
			s[i + 1][j] = s[i][j]
		if a[i] < r and s[i + 1][a[i]] == s[i][a[i]]:
			if s[i + 1][a[i]] == w[0]:
				s[i + 1][a[i]] = w[1]
			else:
				s[i + 1][a[i]] = w[0]
	for i in s:
		print(''.join(i))


import sys
import math, bisect
from collections import defaultdict
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, OrderedDict
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__

def neo():
	return map(int, input().split())

def Neo():
	return list(map(int, input().split()))
for t in range(int(input())):
	n = int(input())
	a = Neo()
	b = 'a' * 64
	print(b)
	for i in a:
		b = list(b)
		b[i] = 'a' if b[i] == 'b' else 'b'
		print(''.join(b))


for tt in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = list('a' * 200)
	print(''.join(s))
	for i in range(n):
		if s[l[i]] == 'a':
			s[l[i]] = 'b'
		else:
			s[l[i]] = 'a'
		print(''.join(s))


def findprefix(arr):
	answer = [[97 for i in range(50 + 1)]]
	for i in range(n):
		nextstr = []
		if arr[i] == 0:
			alter = answer[i][0]
			if alter >= 120:
				for l in range(50 + 1):
					nextstr.append(98)
			else:
				for m in range(50 + 1):
					nextstr.append(122)
			answer.append(nextstr)
		else:
			nextstr = answer[i][:arr[i]]
			alter = answer[i][arr[i]]
			if alter >= 120:
				for j in range(51 - arr[i]):
					nextstr.append(98)
			else:
				for k in range(51 - arr[i]):
					nextstr.append(122)
			answer.append(nextstr)
	for stri in answer:
		for j in stri:
			print(chr(j), end='')
		print()
t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	findprefix(arr)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	mx = max(a)
	ans = ['a' * (mx + 1)] * (n + 1)
	for i in range(len(a)):
		replace = ''
		if ans[i][a[i]] == 'b':
			replace = 'a'
		else:
			replace = 'b'
		ans[i + 1] = ans[i][:a[i]] + replace + ans[i][a[i] + 1:]
	print('\n'.join(ans))


T = int(input())

def solve():
	N = int(input())
	A = list(map(int, input().split()))

	def next_char(c):
		if c == 'a':
			return 'b'
		return 'a'
	ans = []
	ans.append('a' * 101)
	for a in A:
		lst = ans[-1]
		lst = lst[:a] + next_char(lst[a]) + lst[a + 1:]
		ans.append(lst)
	for l in ans:
		print(l)
for _ in range(T):
	solve()


import math as mt
import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	l1 = []
	s = ''
	for i in range(200):
		s += 'a'
	l1.append(s)
	for i in range(n):
		s = ''
		for j in range(a[i]):
			s += l1[-1][j]
		val = ord(l1[-1][a[i]]) + 1
		if val > ord('z'):
			s += 'a'
		else:
			s += chr(val)
		for j in range(a[i] + 1, 200):
			s += l1[i][j]
		l1.append(s)
	for i in l1:
		print(i)


alph = 'cdefghijklmnopqrstuvwxyz' * 10
s = 'ab' * 60
for i in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	b = ['ab' * 80]
	for i in range(1, n + 1):
		b.append(b[i - 1][:a[i - 1]] + alph[i] + b[i - 1][a[i - 1] + 1:])
	for i in b:
		print(i)


def invert(s):
	a = ''
	for i in s:
		if i == 'a':
			a += 'b'
		else:
			a += 'a'
	return a
for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()] + [0]
	s = ['' for i in range(n + 1)]
	s[0] += 'a' * max(l[0], 1)
	print(s[0])
	for i in range(1, n + 1):
		length = max(l[i], l[i - 1])
		if length == 0:
			s[i] += invert(s[i - 1][0])
		s[i] += s[i - 1][:l[i - 1]] + invert(s[i - 1][l[i - 1]:min(len(s[i - 1]), length)])
		if len(s[i]) < length:
			s[i] += 'a' * (length - len(s[i]))
		print(s[i])


y = int(input())
for i in range(y):
	n = int(input())
	a = list(map(int, input().split()))
	m = max(a)
	if m == 0:
		m = 1
	s = ['a'] * m
	t = []
	t.append(s.copy())
	for j in range(n):
		if a[j] == m:
			t.append(s.copy())
			continue
		if s[a[j]] == 'a':
			s[a[j]] = 'b'
		else:
			s[a[j]] = 'a'
		t.append(s.copy())
	for j in t:
		q = ''
		for k in j:
			q = q + k
		print(q)


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		highest = max(a)
		res = ['a' * (highest + 1)] * (n + 1)
		for (index, val) in enumerate(a):
			string = 'a' if res[index][val] == 'b' else 'b'
			res[index + 1] = res[index][:val] + string + res[index][val + 1:]
		print('\n'.join(res))
main()


def ans(n, arr):
	s = 'a' * 51
	l = [s]
	for i in range(n):
		st = list(l[-1])
		st[arr[i]] = chr(ord(st[arr[i]]) + 1)
		if ord(st[arr[i]]) == 123:
			st[arr[i]] = 'a'
		st = ''.join(st)
		l.append(st)
	return l
L = []
t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	L.append(ans(n, arr))
for l in L:
	for j in l:
		print(j)


t = input()
t = int(t)

def solve(n, arr):
	a0 = 'a'
	a1 = 'x'
	s1 = a0 * 200
	print(s1)
	for x in arr:
		s2 = s1[:x]
		if s1[x] == a0:
			s2 += a1 * (200 - x)
		else:
			s2 += a0 * (200 - x)
		print(s2)
		s1 = s2
for i in range(t):
	n = input()
	n = int(n)
	arr = list(map(int, input().split()))
	solve(n, arr)


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		s = ['a' for _ in range(200)]
		print(''.join(s))
		for i in a:
			for j in range(i, 200):
				s[j] = chr((ord(s[j]) - ord('a') + 1) % 26 + ord('a'))
			print(''.join(s))
main()


def printer(s, pos, k):
	x = ['d', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w']
	p = ''
	for i in range(len(s)):
		if i == pos and pos != -1:
			print(x[k % 20], end='')
			p += x[k % 20]
		else:
			print(s[i], end='')
			p += s[i]
	print()
	return p

def ret(s, pos, k):
	x = ['d', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w']
	p = ''
	for i in range(len(s)):
		if i == pos and pos != -1:
			p += x[k % 20]
		else:
			p += s[i]
	return p
t = int(input())
while t:
	t -= 1
	n = int(input())
	arr = list(map(int, input().split()))
	m = max(arr)
	if m == 0:
		y = ['a', 'b']
		k1 = 0
		print('x')
		for i in range(n):
			print(y[k1 % 2])
			k1 += 1
	else:
		p = ''
		for i in range(m):
			p += 'a'
		z = 0
		k = 0
		p = printer(p, -1, k)
		k += 1
		x = ['d', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w']
		for i in range(n):
			if arr[i] == m:
				p = printer(p, -1, k)
				k += 1
			else:
				p = printer(p, arr[i], k)
				k += 1


for h in [*open(0)][2::2]:
	s = [[98] * 99]
	for x in h.split():
		s += ([*s[-1]],)
		s[-1][int(x)] ^= 1
	for i in s:
		print(''.join(map(chr, i)))


cases = []
for i in range(int(input())):
	input()
	cases.append(list(map(int, input().strip().split())))

def solve(case):
	strings = []
	ab = 'abcdefghijklmnopqrstuvwxyz'
	strings.append([0] * 100)
	for difference in case:
		strings.append(strings[-1][:difference] + list(map(lambda index: index + 1, strings[-1][difference:])))
	for string in strings:
		print(''.join(map(lambda index: ab[index % len(ab)], string)))
	return strings
for case in cases:
	solve(case)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	prev = 'a' * 200
	print(prev)
	for x in range(n):
		hehe = ''
		for y in range(a[x]):
			hehe = hehe + prev[y]
		cc = chr((ord(prev[a[x]]) - 97 + 1) % 26 + 97)
		z = hehe + cc * (200 - a[x])
		print(z)
		prev = z


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	if a[0] == 0:
		prev = 'a'
	else:
		prev = 'a' * a[0]
	ans = [prev]
	for i in range(1, n):
		cur = prev[:a[i - 1]]
		if a[i] > a[i - 1]:
			if cur:
				for j in range(ord('a'), ord('a') + 26):
					c = chr(j)
					if c != cur[-1]:
						if len(prev) > len(cur):
							if c != prev[len(cur)]:
								cur += c * (a[i] - a[i - 1])
								break
						else:
							cur += c * (a[i] - a[i - 1])
							break
			elif prev[0] != 'z':
				cur += chr(ord(prev[0]) + 1) * (a[i] - a[i - 1])
			else:
				cur += 'a' * (a[i] - a[i - 1])
		if len(cur) == 0:
			if prev[0] != 'z':
				cur += chr(ord(prev[0]) + 1)
			else:
				cur += 'a'
		ans.append(cur)
		prev = cur
	if a[-1] == 0:
		if prev[0] != 'z':
			ans.append(chr(ord(prev[0]) + 1))
		else:
			cur += 'a'
	else:
		ans.append(prev[:a[-1]])
	for i in ans:
		print(i)


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	list1 = ['a' for i in range(max(ar) + 2)]
	print('a' * 200)
	for i in ar:
		if list1[i] == 'a':
			list1[i] = 'b'
		elif list1[i] == 'b':
			list1[i] = 'a'
		print(''.join(list1))


def solve(arr):
	mxSize = max(arr)
	if mxSize == 0:
		mxSize = 1
	ans = ['a' for i in range(mxSize + 1)]
	print(''.join(ans))
	for i in range(len(arr)):
		curr = ans
		if ans[arr[i]] == 'a':
			f = 'b'
		else:
			f = 'a'
		curr[arr[i]] = f
		print(''.join(curr))
		ans = curr
tc = int(input())
for _ in range(tc):
	n = int(input())
	arr = list(map(int, input().split()))
	solve(arr)


test = int(input())
for num in range(test):
	n = int(input())
	arr = list(map(int, input().split()))
	s0 = 'a' * 200
	while False:
		break
	print(s0)
	for i in range(n):
		xx = arr[i]
		s = s0[:xx]
		while False:
			break
		for j in range(200 - xx):
			if s0[xx + j] == 'a':
				s += 'b'
			else:
				s += 'a'
		print(s)
		s0 = s


n = int(input())

def shift(a):
	return chr((ord(a) + 1 - 97) % 26 + 97)
while n > 0:
	t = int(input())
	arr = [int(x) for x in input().split()]
	maxl = max(max(arr), 1)
	prev = 'a' * maxl
	print(prev)
	cur = prev
	for i in range(1, t):
		if arr[i - 1] == maxl:
			cur = prev
		else:
			cur = prev[:arr[i - 1]] + shift(prev[arr[i - 1]]) + prev[arr[i - 1] + 1:]
		print(cur)
		prev = cur
	if arr[-1] == maxl:
		cur = prev
	else:
		cur = prev[:arr[-1]] + shift(prev[arr[-1]]) + prev[arr[-1] + 1:]
	print(cur)
	n -= 1


res = ''
for _ in range(int(input())):
	input()
	a = [int(x) for x in input().split()]
	r = ['a' * 50]
	for (i, row) in enumerate(a[:]):
		r += [r[i][:row] + r[i][row:].translate({97: 98, 98: 97})]
	res += '\n'.join(r) + '\n'
print(res)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	ch = 97
	l1 = []
	for i in range(n + 1):
		s = ''
		l1.append(s)
	k = l[0]
	l1[0] = l1[0] + k * chr(ch)
	l1[1] = l1[1] + k * chr(ch)
	for i in range(1, n):
		if l[i] > l[i - 1]:
			ch = ch + 1
			if ch > 120:
				ch = 97
			l1[i] = l1[i] + abs(l[i] - l[i - 1]) * chr(ch)
			l1[i + 1] = l1[i]
		elif l[i] == l[i - 1]:
			l1[i + 1] = l1[i]
		else:
			k = l1[i]
			l1[i + 1] = k[0:l[i]]
	n = len(l1)
	prev = ''
	ch = 121
	for i in range(n):
		if len(l1[i]) == 0:
			print(chr(ch))
			if ch == 121:
				ch = ch + 1
			else:
				ch = ch - 1
		else:
			print(l1[i])


from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))

def solve():
	n = ri()
	A = rl()
	curr = ['a'] * 200
	for a in A:
		print(''.join(curr))
		nxt = list(curr)
		if nxt[a] == 'a':
			nxt[a] = 'b'
		else:
			nxt[a] = 'a'
		curr = list(nxt)
	print(''.join(curr))
mode = 'T'
if mode == 'T':
	t = ri()
	for i in range(t):
		solve()
else:
	solve()


T = int(input())
fix = 50
for t in range(T):
	n = int(input())
	A = [int(i) for i in input().split()]
	ans = ['a' * 50]
	for i in range(n):
		tmp = ans[-1][:A[i]]
		for j in range(A[i], fix):
			if ans[-1][j] == 'a':
				tmp += 'b'
			else:
				tmp += 'a'
		ans.append(tmp)
	for i in ans:
		print(i)


t = int(input())
for _ in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	S = 'abcdefghijklmnopqrstuvwxyz'
	k = 0
	ch = 'a'
	x = ar[0]
	st = ch * x
	if ar[0] == 0:
		print(ch)
		ch = 'b'
		st = ch
	else:
		print(ch * x)
	for i in range(1, n):
		y = ar[i]
		if y == x == 0:
			k += 1
			l = len(st)
			st = S[k % 26] + st[:l - 1]
		if y > x:
			k += 1
			if x == 0:
				l = len(st)
				st = st[:l - 1]
			st += S[k % 26] * (y - x)
		print(st)
		if y < x:
			st = st[:y]
		x = y
	if x == 0:
		print(S[(k + 1) % 26])
	else:
		print(st)


import sys, collections, math

def in_out():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	l = max(arr)
	if l == 0:
		s = 'a'
		f = 1
		for i in range(n + 1):
			if f == 1:
				print('a')
				f = 0
			else:
				print('b')
				f = 1
		continue
	ans = ['a' * l for i in range(n + 1)]
	res = ['a' * l]
	for i in range(1, n + 1):
		val = res[i - 1]
		pre = arr[i - 1]
		st = val[:pre]
		for j in range(pre, l):
			if val[j] == 'a':
				st += 'b'
			else:
				st += 'a'
		res.append(st)
	for ele in res:
		print(ele)


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	if max(a) != 0:
		last = 'a' * max(a)
	else:
		last = 'a'
	for i in range(n):
		print(last)
		last_1 = last[:a[i]]
		for j in range(a[i], len(last)):
			if last[j] == 'a':
				last_1 += 'b'
			else:
				last_1 += 'a'
		last = last_1
	print(last)


ans = ['a'] * 200
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().strip().split()))
	print(''.join(map(str, ans)))
	for i in range(n):
		cha = ans[a[i]]
		chb = 'a'
		if cha == chb:
			chb = 'b'
		ans[a[i]] = chb
		print(''.join(map(str, ans)))


import sys
import collections

def input():
	return sys.stdin.readline().rstrip()

def split_input():
	return [int(i) for i in input().split()]

def change(x):
	if x == 'z':
		return 'a'
	else:
		return 'z'
tests = int(input())
for _ in range(tests):
	n = int(input())
	a = split_input()
	ans = []
	ans.append('a' * 200)
	for i in a:
		tmp = ans[-1][:i]
		for j in range(i, 200):
			tmp += change(ans[-1][j])
		ans.append(tmp)
	print(*ans, sep='\n')


n = int(input())
ans = []
for i in range(n):
	z = int(input())
	l = list(map(int, input().split()))
	mx = max(l) + 2
	tmp = ['a' * mx]
	for i in l:
		tu = tmp[len(tmp) - 1]
		tmp1 = tu[:i] + (mx - i) * chr((ord(tu[i]) + 1) % 26 + 97)
		tmp += [tmp1]
	ans += tmp
for i in ans:
	print(i)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	m = max(a) + 1
	s = ['a'] * m
	print(''.join(s))
	for i in range(n):
		for j in range(a[i], m):
			if not s[j] == 'z':
				s[j] = chr(ord(s[j]) + 1)
			else:
				s[j] = 'a'
		print(''.join(s))


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	m = max(a)
	S = ['a' * (m + 1)] * (n + 1)
	for (i, x) in enumerate(a):
		w = ''
		if S[i][x] == 'b':
			w = 'a'
		else:
			w = 'b'
		S[i + 1] = S[i][:x] + w + S[i][x + 1:]
	print('\n'.join(S))


from functools import reduce
import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

def sarr():
	return [int(i) for i in input()]

def inn():
	return int(input())
mo = 1000000007
t = inn()
st = 'abcdefghijklmnopqrstuvwxyz'
while t:
	t -= 1
	n = inn()
	a = arr()
	s = ['a'] * (max(a) + 1)
	print(*s, sep='')
	j = 1
	for i in range(n):
		if s[a[i]] == st[j % 26]:
			j += 1
		s[a[i]] = st[j % 26]
		j += 1
		print(*s, sep='')


t = int(input())
for i in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	prev = 'a' * 60
	print(prev)
	for i in arr:
		if prev[i] == 'a':
			x = 'b'
		else:
			x = 'a'
		curr = prev[0:i] + x + prev[i + 1:]
		print(curr)
		prev = curr


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	print('a' * 52)
	prev = ['a'] * 52
	for i in range(0, n):
		j = a[i]
		if prev[j] == 'b':
			for k in range(j, 52):
				prev[k] = 'a'
		else:
			for k in range(j, 52):
				prev[k] = 'b'
		print(''.join([a for a in prev]))


cases = int(input())
for t in range(cases):
	n = int(input())
	a = list(map(int, input().split()))
	s = 'a' * 200
	print(s)
	for i in a:
		v = s[:i + 1]
		if v and v[-1] == 'a':
			s = s[:i] + 'b' * (200 - i)
		elif v and v[-1] == 'b':
			s = s[:i] + 'a' * (200 - i)
		elif s[-1] == 'a':
			s = 'b' * 200
		elif s[-1] == 'b':
			s = 'a' * 200
		print(s)


import sys
input = sys.stdin.readline
for nt in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	ans = ['a' * a[0]]
	x = 1
	for i in range(1, n):
		ans.append(ans[-1][0:a[i - 1]] + chr(x + 97) * max(0, a[i] - a[i - 1]))
		x += 1
		x = x % 20
	ans.append(ans[-1][0:a[-1]])
	for i in range(n + 1):
		if len(ans[i]) == 0:
			if i == 0 or ans[i - 1][0] == 'x':
				ans[i] = 'y'
			else:
				ans[i] = 'x'
	for i in ans:
		print(i)


def common_prefixes_alternate(n, lst):
	mx = max(lst)
	ans = ['a' * (mx + 1)] * (n + 1)
	for (i, x) in enumerate(lst):
		who = 'a' if ans[i][x] == 'b' else 'b'
		ans[i + 1] = ans[i][:x] + who + ans[i][x + 1:]
	print('\n'.join(ans))
t = int(input())
for i in range(t):
	n = int(input())
	lt = list(map(int, input().split()))
	common_prefixes_alternate(n, lt)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	temp = max(a) + 1
	s = 'a' * temp
	print(s)
	k = 1
	for i in range(n):
		if a[i] == 0:
			s = chr(k + 97) * (temp - a[i])
			k += 1
			if k == 25:
				k = 2
			print(s)
		else:
			s = s[:a[i]] + chr(k + 97) * (temp - a[i])
			k += 1
			if k == 25:
				k = 2
			print(s)


import math
import random
from collections import *
mod = 1000000007
r1 = lambda : int(input())
rm = lambda : map(int, input().split())
rms = lambda : map(str, input().split())
rls = lambda : list(rm())

def def_value():
	return 'nan'

def solve():
	test = r1()
	while test:
		test -= 1
		n = r1()
		ls = rls()
		x = max(ls)
		s = 'a' * x
		if len(s) == 0:
			s = 'a'
		print(s)
		for kk in range(n):
			s = list(s)
			for i in range(ls[kk], len(s)):
				if s[i] == 'a':
					s[i] = 'b'
				else:
					s[i] = 'a'
			s = ''.join(s)
			print(s)
solve()


for i in range(int(input())):
	n = int(input())
	common = list(map(int, input().split()))
	maxi = max(1, max(common))
	current = 0
	last = 'a' * maxi
	print(last)
	for j in range(n):
		if common[j] == maxi:
			now = last
			print(now)
		else:
			now = last[0:common[j]] + chr((ord(last[common[j]]) - 97 + 1) % 26 + 97) * (maxi - common[j])
			print(now)
		last = now


def f(l1, c):
	d = c - len(l1)
	if d >= 0:
		for i in range(d):
			l1.append(1)
		return (l1, l1[:])
	else:
		l2 = l1[:c]
		for i in range(abs(d)):
			f = 1
			if l1[c + i] == f:
				f += 1
			l2.append(f)
		return (l1, l2)
for w in range(int(input())):
	n = int(input())
	a = list(map(int, input().strip().split()))
	l = []
	n1 = a[0]
	l1 = [i for i in range(1, n1 + 1)]
	if n1 == 0:
		l1 = [1]
	l.append(l1)
	for j in range(0, n):
		l1 = l.pop()
		c = a[j]
		(l1, l2) = f(l1, c)
		l.append(l1)
		l.append(l2)
	for i in l:
		s = ''
		for letter in i:
			if letter == 1:
				s += 'a'
			else:
				s += 'b'
		print(s)


c = 97
m = 25
for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	s = [str('a' * max(a[0], 1))]
	print(s[0])
	l = 0
	for i in range(n):
		if i == n - 1:
			l = max(a[i], 1)
		else:
			l = max(a[i], a[i + 1], 1)
		if len(s[i]) > a[i]:
			s.append(s[i][:a[i]] + chr((ord(s[i][a[i]]) - c + 1) % m + c) * (l - a[i]))
		else:
			s.append(s[i][:a[i]] + chr(i % m + c) * (l - a[i]))
		print(s[i + 1])


import math
import os
import random
import re
from sys import stdin, stdout
from collections import *

def solve():
	for _ in range(int(input())):
		n = int(input())
		l = list(map(int, input().strip().split()))
		lf = []
		r = ['a'] * (max(l) + 1)
		lf.append(r)
		for i in range(n):
			x = lf[-1][:]
			if x[l[i]] == 'a':
				x[l[i]] = 'b'
			else:
				x[l[i]] = 'a'
			lf.append(x)
		for i in range(n + 1):
			print(''.join(lf[i][:]))
solve()


import sys
import string
import math
from collections import defaultdict
from functools import lru_cache
from collections import Counter
from fractions import Fraction

def mi(s):
	return map(int, s.strip().split())

def lmi(s):
	return list(mi(s))

def tmi(s):
	return tuple(mi(s))

def mf(f, s):
	return map(f, s)

def lmf(f, s):
	return list(mf(f, s))

def js(lst):
	return ' '.join((str(d) for d in lst))

def jsns(lst):
	return ''.join((str(d) for d in lst))

def line():
	return sys.stdin.readline().strip()

def linesp():
	return line().split()

def iline():
	return int(line())

def mat(n):
	matr = []
	for _ in range(n):
		matr.append(linesp())
	return matr

def matns(n):
	mat = []
	for _ in range(n):
		mat.append([c for c in line()])
	return mat

def mati(n):
	mat = []
	for _ in range(n):
		mat.append(lmi(line()))
	return mat

def pmat(mat):
	for row in mat:
		print(js(row))

def solve(arr):
	if arr[0] == 0:
		ans = ['a', 'b']
	else:
		ans = [arr[0] * 'a', arr[0] * 'a']
	for i in range(1, len(arr)):
		n = arr[i]
		if len(ans[i]) < n:
			if len(ans[i - 1]) > len(ans[i]):
				ans[i] += (n - len(ans[i])) * 'b' if ans[i - 1][len(ans[i])] == 'a' else (n - len(ans[i])) * 'a'
			else:
				ans[i] += (n - len(ans[i])) * 'a'
		if n == 0:
			ans.append('b' if ans[i][0] == 'a' else 'a')
		else:
			ans.append(ans[i][:n])
	for word in ans:
		print(word)

def main():
	t = iline()
	for _ in range(t):
		line()
		solve(lmi(line()))
main()


def solve():
	n = int(input())
	l = list(map(int, input().split()))
	x = max(l)
	s = ['a'] * 51
	for i in s:
		print(i, end='')
	print()
	for i in range(n):
		if s[l[i]] == 'a':
			s[l[i]] = 'b'
		else:
			s[l[i]] = 'a'
		for i in s[:x + 1]:
			print(i, end='')
		print()
t = int(input())
while t > 0:
	solve()
	t -= 1


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		b = ['a' * 50]
		A = 'abcdefghijklmnopqrstuvwxyz'
		A = set(list(A))
		for (idx, i) in enumerate(a[::-1]):
			s = b[-1][:i]
			if i < 50:
				k = b[-1][i]
				A.remove(k)
				for j in A:
					s += j * (50 - i)
					break
				A.add(k)
			b.append(s)
		b = b[::-1]
		for i in b:
			print(i)
	return
main()


from collections import defaultdict
import math

def solve(arr, n):
	first = 'a' * 200
	result = []
	result.append(first)
	for i in range(n):
		lt = result.pop()
		slt = lt[:arr[i]] + ('b' if lt[arr[i]] == 'a' else 'a') + lt[arr[i] + 1:]
		result.append(lt)
		result.append(slt)
	return result
for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	for i in solve(arr, n):
		print(i)


import random
lines = []
try:
	while True:
		line = input()
		if line:
			lines.append(line)
		else:
			break
except:
	pass

def get_next_char(s):
	return chr(ord('a') + (ord(s) - ord('a') + 1) % 26)
current_line = 0
for test_cases in range(int(lines[0])):
	current_line += 2
	suffix_split_str = lines[current_line].split(' ')
	suffix_split = [int(i) for i in suffix_split_str]
	max_length = max(suffix_split) + 1
	a = ord('a')
	result = 'a'
	for i in range(max_length - 1):
		result += get_next_char(result[-1])
	print(result)
	for i in range(len(suffix_split)):
		new_result = result[:suffix_split[i]]
		next_char = get_next_char(result[suffix_split[i]])
		for j in range(len(new_result), max_length):
			new_result += next_char
			next_char = get_next_char(next_char)
		print(new_result)
		result = new_result


for _ in range(int(input())):
	s = ['a'] * 60
	n = int(input())
	l = list(map(int, input().split()))
	for j in range(len(s)):
		print(s[j], end='')
	print()
	use = ord('b')
	for i in l:
		if s[i] == 'b':
			s[i] = 'a'
		else:
			s[i] = 'b'
		for j in range(len(s)):
			print(s[j], end='')
		print()
		last = i


import sys
input = sys.stdin.readline
(inp, ip) = (lambda : int(input()), lambda : [int(w) for w in input().split()])
alp = 'abcdefghijklmnopqrstuvwxy'
for _ in range(inp()):
	n = inp()
	x = ip()
	s = 'z' * 50
	ans = []
	ans.append(s)
	for i in range(n):
		t = ans[-1][:x[i]]
		t += alp[i % 25] * (50 - len(t))
		ans.append(t)
	for i in ans:
		print(i)


T = int(input())
while T > 0:
	N = int(input())
	list_match = [int(x) for x in input().split()]
	list1 = ['a'] * 200
	print(''.join(list1))
	for i in list_match:
		if list1[i] == 'a':
			list1[i] = 'b'
			print(''.join(list1))
		else:
			list1[i] = 'a'
			print(''.join(list1))
	T -= 1


t = int(input())
while t > 0:
	n = int(input())
	a = list(map(int, input().split()))
	l = ['a', 'b', 'c']
	s = []
	a.insert(0, 0)
	a.append(0)
	for i in range(n + 1):
		ml = max(a[i], a[i + 1])
		if ml == 0:
			if i == 0:
				s.append('a')
			elif s[-1][0] == 'a':
				s.append('b')
			elif s[-1][0] == 'b':
				s.append('c')
			elif s[-1][0] == 'c':
				s.append('b')
		elif a[i] >= a[i + 1]:
			s.append(s[-1][:ml])
		elif i == 0:
			f = ''
			for j in range(ml):
				f = f + 'a'
			s.append(f)
		else:
			f = s[-1][:a[i]]
			for j in range(a[i], len(s[-1])):
				if s[-1][j] == 'a':
					f = f + 'b'
				elif s[-1][j] == 'b':
					f = f + 'c'
				elif s[-1][j] == 'c':
					f = f + 'b'
			for j in range(len(s[-1]), ml):
				f = f + 'a'
			s.append(f)
	for i in range(n + 1):
		print(s[i])
	t = t - 1


def solve(n, a):
	mx = max(a)
	ans = ['a' * (mx + 1)] * (n + 1)
	for (i, x) in enumerate(a):
		y = 'a' if ans[i][x] == 'b' else 'b'
		ans[i + 1] = ans[i][:x] + y + ans[i][x + 1:]
	print('\n'.join(ans))
t = int(input())
while t != 0:
	N = int(input())
	A = list(map(int, input().split(' ')))
	solve(N, A)
	t -= 1


import sys
sys.setrecursionlimit(10000)
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	length = max(a) + 1
	init = ''
	for i in range(length):
		init += chr(i % 26 + 97)
	print(init)
	prev = init
	for pref in a:
		nxt = prev[:pref]
		for i in range(pref, length):
			if ord(prev[i]) == 122:
				nxt += 'a'
			else:
				nxt += chr(ord(prev[i]) + 1)
		print(nxt)
		prev = nxt


for _ in range(int(input())):
	n = int(input())
	inp = list(map(int, input().split()))
	maxlen = max(inp)
	letter = 97
	ans = chr(letter) * inp[0]
	if inp[0] == 0:
		ans = 'a'
		print(ans)
	else:
		print(ans[:inp[0]])
	for i in range(1, n):
		if inp[i] <= inp[i - 1]:
			if inp[i - 1] == 0:
				letter += 1
				if letter > 122:
					letter = 97
				if inp[i] == 0:
					ans = chr(letter)
				else:
					ans = chr(letter) * inp[i]
			else:
				ans = ans[:inp[i - 1]]
			print(ans)
		else:
			letter += 1
			if letter > 122:
				letter = 97
			ans = ans[:inp[i - 1]] + chr(letter) * (inp[i] - inp[i - 1])
			print(ans)
	if inp[-1] == 0:
		letter += 1
		print(chr(letter))
	else:
		print(ans[:inp[-1]])


for _ in range(int(input())):
	n = int(input())
	(s, p, a) = ([''], 0, 97)
	for el in map(int, input().split()):
		if el == 0:
			s[-1] += 'z'
			s.append(chr(a))
			a += 1
			p = 1
		elif el > p:
			s[-1] += (el - p) * chr(a)
			s.append(s[-1])
			a += 1
			p = el
		else:
			s.append(s[-1][:el])
			p = el
		if a == ord('z'):
			a = 97
	for el in s:
		print(el)


test = int(input())
for t in range(test):
	n = int(input())
	arr = input().split()
	curr = ''
	for i in range(200):
		curr = curr + 'a'
	print(curr)
	for i in arr:
		new = curr[:int(i)]
		if curr[int(i)] == 'a':
			for j in range(int(i), 200):
				new = new + 'b'
		elif curr[int(i)] == 'b':
			for j in range(int(i), 200):
				new = new + 'a'
		print(new)
		curr = new


t = int(input())
while t > 0:
	size = int(input())
	inp = list(map(int, input().split()))
	string = []
	for i in range(200):
		string.append('a')
		print(string[i], end='')
	print()
	for i in range(size):
		temp = inp[i]
		for i in range(temp):
			print(string[i], end='')
		for i in range(200 - temp):
			if string[temp + i] == 'a':
				string[temp + i] = 'b'
				print(string[temp + i], end='')
			else:
				string[temp + i] = 'a'
				print(string[temp + i], end='')
		print()
	t -= 1


inp = lambda : map(int, input().split(' '))
(t,) = inp()
for _ in range(t):
	(n,) = inp()
	a = list(inp())
	a.append(50)
	res = []
	str1 = '{}b'.format('a' * a[0])
	print(str1)
	for i in range(n):
		delim = chr(97 + (ord(str1[a[i]]) - 96) % 26)
		str2 = '{}{}'.format(str1[:a[i]], delim)
		str2_len = max(a[i], a[i + 1])
		str2 += 'a' * (str2_len - a[i])
		res.append(str2)
		str1 = str2
		print(str1)


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	s = ['a' * 200]
	for i in range(1, n + 1):
		ss = s[-1]
		j = a[i - 1]
		if ss[j] == 'a':
			ss = ss[:j] + 'b' + ss[j + 1:]
		else:
			ss = ss[:j] + 'a' + ss[j + 1:]
		s.append(ss)
	for i in s:
		print(i)
for _ in range(int(input())):
	solve()


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = ['a'] * 52
	print(''.join(s))
	for i in range(n):
		temp = chr(ord(s[l[i]]))
		if temp == 'a':
			s[l[i]] = 'b'
		else:
			s[l[i]] = 'a'
		print(''.join(s))


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	mx = max(a)
	ans = ['a'] * (mx + 1)
	res = [''.join(map(str, ans))]
	for i in a:
		if ans[i] == 'a':
			ans[i] = 'b'
		else:
			ans[i] = 'a'
		res.append(''.join(map(str, ans)))
	for i in res:
		print(i)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = 'a' * 50
	ans = [s]
	for i in range(n):
		s = ''
		for j in range(50):
			if j < a[i]:
				s += ans[-1][j]
			elif ans[-1][j] == 'a':
				s += 'b'
			else:
				s += 'a'
		ans.append(s)
	for i in range(n + 1):
		print(ans[i])


import sys
input = sys.stdin.readline
import heapq
import copy
import math
import decimal

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def insr2():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())

def pr_list(a):
	print(*a, sep=' ')

def main():
	tests = inp()
	mod = 1000000007
	limit = 10 ** 18
	ans = 0
	stack = []
	hashm = {}
	arr = []
	heapq.heapify(arr)
	for test in range(tests):
		n = inp()
		a = inlt()
		ans = []
		l = 2 * max(a) + 1
		ans.append(list('a' * l))
		for i in range(1, n + 1):
			curr = ans[i - 1][0:a[i - 1]]
			curr.append(chr(ord('a') + i % 25 + 1))
			curr = curr + list('a' * (l - len(curr)))
			ans.append(curr)
		for i in range(len(ans)):
			print(''.join(ans[i]))
main()


import string
import random
t = int(input())
for _ in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	s = ''
	s += 'a' * 200
	print(s)
	for i in lst:
		s = list(s)
		if s[i] == 'a':
			s[i] = 'b'
		else:
			s[i] = 'a'
		print(''.join(s))


import sys
readline = lambda : sys.stdin.readline().strip('\n')
readlist = lambda : list(map(int, readline().split()))
for _ in range(int(input())):
	n = int(input())
	a = readlist()
	s0 = ['a'] * 100
	print(''.join(s0))
	for i in a:
		s1 = s0.copy()
		s1[i] = 'ab'[s0[i] == 'a']
		s0 = s1
		print(''.join(s0))


def reverse(s):
	return 'b' if s == 'a' else 'a'
t = int(input())
for _ in range(t):
	n = int(input())
	diff = list(map(int, input().split()))
	words = ['a' * 50] * (len(diff) + 1)
	print(words[0])
	for i in range(1, len(diff) + 1):
		words[i] = words[i - 1][:diff[i - 1]] + reverse(words[i - 1][diff[i - 1]:diff[i - 1] + 1]) + words[i - 1][diff[i - 1] + 1:]
		print(words[i])


t = int(input())
for tt in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	ans = [''] * (n + 1)
	curr = 0
	ans[0] = 'a'
	for i in range(1, n + 1):
		curr = (curr + 1) % 25
		if a[i - 1] != 0:
			if a[i - 1] <= len(ans[i - 1]):
				ans[i] = ans[i - 1][:a[i - 1]] + chr(curr + 97)
			else:
				ans[i - 1] = ans[i - 1] + chr(curr + 97) * (a[i - 1] - len(ans[i - 1]))
				curr = (curr + 1) % (97 + 25)
				ans[i] = ans[i - 1][:a[i - 1]] + chr(curr + 97)
		else:
			ans[i] = chr(curr + 97)
	print('\n'.join(ans))


import copy
t = int(input())
while t > 0:
	n = int(input())
	a = [int(i) for i in input().split()]
	s = ['a' for i in range(52)]
	out = []
	out.append(s)
	for i in a:
		curr = copy.copy(out[-1])
		if curr[i] == 'a':
			curr[i] = 'b'
		else:
			curr[i] = 'a'
		out.append(curr)
	for i in out:
		print(''.join(i))
	t -= 1


for u in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = list('a' * 200)
	print(''.join(s))
	for i in range(n):
		if s[l[i]] == 'a':
			s[l[i]] = 'z'
		else:
			s[l[i]] = 'a'
		print(''.join(s))


import string
t = int(input())
letters = string.ascii_lowercase
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	s = [[] for _ in range(n + 1)]
	j = 0
	for (i, x) in enumerate(a):
		if i == 0:
			for _ in range(a[i]):
				s[i].append(letters[j])
				j = (j + 1) % 26
			if len(s[i]) == 0:
				s[i].append(letters[0])
		else:
			temp = s[i - 1][:a[i - 1]]
			if a[i - 1] < a[i]:
				if len(s[i - 1]) > a[i - 1]:
					j = letters.find(s[i - 1][a[i - 1]])
					j = (j + 1) % 26
				else:
					j = letters.find(temp[-1])
					j = (j + 1) % 26
				for _ in range(a[i] - a[i - 1]):
					temp.append(letters[j])
					j = (j + 1) % 26
			if len(temp) == 0:
				j = letters.find(s[i - 1][0])
				j = (j + 1) % 26
				temp.append(letters[j])
			s[i] = temp
	s[n] = s[n - 1][:a[n - 1]]
	if len(s[n]) == 0:
		j = letters.find(s[n - 1][0])
		j = (j + 1) % 26
		s[n].append(letters[j])
	s = [''.join(x) for x in s]
	for s_i in s:
		print(s_i)


import string
import random
inp_test = int(input())
for i in range(inp_test):
	n = int(input())
	list_n = list(map(int, input().split(' ')))
	prev = ''.join(random.choices(string.ascii_lowercase, k=max(list_n) + 5))
	print(prev)
	current = ''
	for i in list_n:
		if i == 0:
			new2 = prev.replace(prev[0], '')
			current2 = ''.join(random.choices(string.ascii_lowercase, k=max(list_n) + 5))
			prev = new2 + current2
			print(prev)
		else:
			current = ''.join(random.choices(string.ascii_lowercase, k=max(list_n) + 5))
			new1 = prev[0:i]
			prev = new1 + current.replace(prev[i], '')
			print(prev)


def find(c):
	if c == 'z':
		return 'y'
	else:
		return 'z'
test = int(input())
for i in range(test):
	n = int(input())
	a = list(map(int, input().split(' ')))
	s = ['z'] * 100
	print(''.join(s))
	for x in a:
		s[x] = find(s[x])
		print(''.join(s))


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().strip().split()))[:n]
	ans = ['a'] * 51
	print(''.join(ans))
	for i in a:
		asc = ord(ans[i]) + 1
		if asc >= 122:
			asc = 97
		ans[i] = chr(asc)
		print(''.join(ans))


t = int(input())
from sys import stdout
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	ans = ['a' * 60]
	for j in range(n):
		a = ord(ans[-1][-1]) + 1
		if a > 122:
			a = a % 123 + 97
		c = chr(a)
		if l[j]:
			if c == ans[-1][:l[j] + 1][-1]:
				if c == 'z':
					c = 'a'
				else:
					c = chr(ord(c) + 1)
		ans.append(ans[-1][:l[j]] + c * (60 - l[j]))
	for j in ans:
		stdout.write(j + '\n')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	ans = ['a' * 50] * (n + 1)
	f = 'b'
	for i in range(n):
		if a[i] != 50:
			f = 'a' if ans[i][a[i]] == 'b' else 'b'
		ans[i + 1] = ans[i][:a[i]] + f * max(0, 50 - a[i])
	print(*ans, sep='\n')


for i in range(int(input())):
	a = int(input())
	b = list(map(int, input().split()))
	c = ['a' * 200]
	for j in range(a):
		if c[-1][b[j]] != 'b':
			c.append(c[-1][:b[j]] + 'b' + c[-1][b[j] + 1:])
		else:
			c.append(c[-1][:b[j]] + 'a' + c[-1][b[j] + 1:])
	for j in c:
		print(j)


for j in range(int(input())):
	a = int(input())
	b = list(map(int, input().split()))
	c = 'a'
	d = c * 200
	print(d)
	for i in b:
		if i == 0:
			if d[0] == 'a':
				d = 'b' + d[1:]
				print(d)
			elif d[0] == 'b':
				d = 'a' + d[1:]
				print(d)
		elif d[i] == 'a':
			d = d[:i] + 'b' + d[i + 1:]
			print(d)
		elif d[i] == 'b':
			d = d[:i] + 'a' + d[i + 1:]
			print(d)


for t in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	i = 0
	m = max(l)
	ans = ['a' * (m + 1)] * (n + 1)
	for (i, j) in enumerate(l):
		who = 'a' if ans[i][j] == 'b' else 'b'
		ans[i + 1] = ans[i][:j] + who + ans[i][j:]
	print('\n'.join(ans))


t = int(input())
for u in range(t):
	n = int(input())
	print(80 * 'a')
	r = 80 * 'a'
	k = input().split()
	for i in range(n):
		f = 'b'
		if 'b' == r[int(k[i])]:
			f = 'a'
		r = r[0:int(k[i])] + f + r[int(k[i]) + 1:80]
		print(r)


import math, sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda : int(input())
li = lambda : list(map(int, input().split()))

def solve():
	n = I()
	a = li()
	ans = ['a' * 50]
	print(''.join(map(str, ans[-1])))
	for i in range(n):
		s = []
		for j in range(a[i]):
			s.append(ans[-1][j])
		for j in range(a[i], 50):
			if ans[-1][j] == 'a':
				s.append('b')
			else:
				s.append('a')
		ans.append(s)
		print(''.join(map(str, ans[-1])))
for _ in range(I()):
	solve()


import math as mt

def tran(arr, n):
	an = []
	if max(arr) > 0:
		p = 'a' * max(arr)
		an.append(p)
		for i in range(len(arr)):
			por = str(p)
			p = p[:arr[i]]
			if len(p) == max(arr):
				an.append(p)
			elif por[len(p)] == 'a':
				p = p + 'b' * (max(arr) - arr[i])
				an.append(p)
			else:
				p = p + 'a' * (max(arr) - arr[i])
				an.append(p)
		return an
	else:
		s = 'ab' * len(arr)
		for i in s:
			an.append(i)
			if len(an) == len(arr) + 1:
				break
		return an
t = int(input())
ans = []
for i in range(t):
	n = int(input())
	arr = list(map(int, input().rstrip().split()))
	r = tran(arr, n)
	ans.append(r)
for i in ans:
	for j in i:
		print(j)


for i in range(int(input())):
	t = int(input())
	l = ['a'] * 100
	print(''.join(l))
	ar = list(map(int, input().split()))
	for i in ar:
		if l[i] == 'a':
			l[i] = 'b'
		else:
			l[i] = 'a'
		print(''.join(l))


t = int(input())
for _ in range(t):
	n = int(input())
	lst = list(map(int, input().split()))
	max = max(lst) + 1
	a = 'a' * max
	print(a)
	for i in range(n):
		b = a[:lst[i]]
		if lst[i] == max:
			print(b)
			continue
		if a[lst[i]] == 'a':
			b = b + 'b' * (max - lst[i])
		else:
			b = b + 'a' * (max - lst[i])
		print(b)
		a = b
	del max


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	s = 'a' * 51
	print(s)
	for i in arr:
		t = s[:i]
		if s[i] == 'a':
			for j in range(i, 51):
				t += 'z'
		elif s[i] == 'z':
			for j in range(int(i), 51):
				t += 'a'
		print(t)
		s = t


import math
t = int(input())
for w in range(t):
	n = int(input())
	l = [int(i) for i in input().split()]
	k = max(l)
	s = 'a' * 52
	print(s)
	for i in range(n):
		if s[l[i]] == 'a':
			ans = s[:l[i]] + 'b' * (52 - l[i])
		else:
			ans = s[:l[i]] + 'a' * (52 - l[i])
		print(ans)
		s = ans


import sys
input = sys.stdin.readline
f = lambda : list(map(int, input().split()))
for _ in range(int(input())):
	n = int(input())
	a = f()
	p = 'a' * 200
	print(p)
	for i in a:
		c = p[:i] + ('x' if p[i] == 'z' else 'z') + 'a' * (199 - len(p[:i]))
		print(c)
		p = c


from sys import stdin, stdout, stderr, maxsize
tup = lambda : map(int, stdin.readline().split())
I = lambda : int(stdin.readline())
lint = lambda : [int(x) for x in stdin.readline().split()]
S = lambda : stdin.readline().replace('\n', '').strip()
stpr = lambda x: stdout.write(f'{x}' + '\n')
star = lambda x: print(' '.join(map(str, x)))
from collections import defaultdict
from itertools import permutations
s = ['a'] * 100
for _ in range(I()):
	n = I()
	ls = lint()
	print(''.join(s))
	for i in ls:
		if s[i] == 'b':
			s[i] = 'a'
		elif s[i] == 'a':
			s[i] = 'b'
		print(''.join(s))


ch = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	m = max(a)
	m = max(m, 1)
	j = 0
	s = ''
	for i in range(n):
		if i == 0:
			if a[i]:
				s = ch[j] * m
				print(s)
				s = s[:a[i]]
				j = (j + 1) % 25
			else:
				s = ch[j] * m
				print(s)
				j = (j + 1) % 25
				s = ch[j] * m
		elif a[i - 1] <= a[i] and a[i]:
			s = s + (m - len(s)) * ch[j]
			print(s)
			s = s[:a[i]]
			j = (j + 1) % 25
		elif a[i] < a[i - 1] and a[i]:
			s = s + (m - len(s)) * ch[j]
			print(s)
			s = s[:a[i]]
			j = (j + 1) % 25
		elif a[i] == 0:
			print(s)
			j = (j + 1) % 25
			s = ch[j] * m
	print(s)


def multiple_input():
	return map(int, input().split())

def list_input():
	return list(map(int, input().split()))
for _ in range(int(input())):
	n = int(input())
	a = list_input()
	ans = list()
	ans.append('a' * max(1, a[0]))
	for i in range(1, n):
		s = ''
		for j in range(a[i - 1]):
			s += ans[i - 1][j]
		if a[i] > a[i - 1]:
			for j in range(a[i - 1], min(len(ans[i - 1]), a[i])):
				if ans[i - 1][j] == 'a':
					s += 'b'
				else:
					s += 'a'
			if a[i] > len(ans[i - 1]):
				for j in range(a[i] - len(ans[i - 1])):
					s += 'a'
		if s == '':
			if ans[i - 1][0] == 'a':
				s = 'b'
			else:
				s = 'a'
		ans.append(s)
	s = ''
	for j in range(min(len(ans[len(ans) - 1]), a[n - 1])):
		s += ans[len(ans) - 1][j]
	if s == '':
		if ans[len(ans) - 1][0] == 'a':
			s = 'b'
		else:
			s = 'a'
	ans.append(s)
	for i in ans:
		print(i)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()[:n]))
	s = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
	string = []
	alp = s[1]
	c = 2
	m = max(a)
	if m == 0:
		m = 1
	string.append(m * 'a')
	print(string[0])
	for i in range(n):
		if c == 26:
			c = 0
		so = string[i][0:a[i]] + (m - a[i]) * alp
		if a[i] != m:
			alp = s[c]
			c += 1
		string.append(so)
		print(string[i + 1])


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = []
	for i in range(n + 1):
		s.append('')
	j = 0
	k = 0
	for i in a:
		if i > len(s[j]):
			if k < 26:
				s[j] += chr(97 + k) * (i - len(s[j]))
				k += 1
			else:
				s[j] += chr(130 - k) * (i - len(s[j]))
				k = 13
		s[j + 1] = s[j][:i]
		if i == 0 and j == 0:
			s[j] = 'kite'
			s[j + 1] = 'tight'
		if i == 0 and j != 0:
			if s[j][0] == 'z':
				s[j + 1] = 'a'
			else:
				s[j + 1] = chr(ord(s[j][0]) + 1)
		j += 1
	for i in s:
		print(i)


def next(c):
	if c == 'b':
		return 'c'
	return 'b'

def ans(A):
	ret = ['a' * 60]
	for p in A:
		last = ret[-1]
		last = list(last)
		last[p] = next(last[p])
		ret += [''.join(last)]
	for s in ret:
		print(s)
T = int(input())
for _ in range(T):
	input()
	A = input().split(' ')
	A = list(map(int, A))
	ans(A)


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(p) for p in input().split()]
	temp = list('a' * 200)
	words = [''.join(temp)]
	for i in range(len(arr)):
		temp = list(words[-1])
		if temp[arr[i]] == 'a':
			temp[arr[i]] = 'b'
		else:
			temp[arr[i]] = 'a'
		words.append(''.join(temp))
	for i in words:
		print(i)


test = int(input())

def solve():
	n = int(input())
	arr = [int(i) for i in input().split()]
	si = 0
	for i in range(len(arr)):
		if arr[i] > si:
			si = arr[i]
	if si == 0:
		print('b')
		for i in range(len(arr)):
			if i % 2 == 0:
				print('a')
			else:
				print('b')
		return
	prev = 'a' * si
	print(prev)
	for i in range(len(arr)):
		maxi = si
		val = arr[i]
		li = ''
		j = 0
		while maxi > 0 and val > 0:
			maxi -= 1
			val -= 1
			li += prev[j]
			j += 1
		li1 = ''
		while maxi > 0:
			if prev[j] == 'b':
				li1 += 'a'
			else:
				li1 += 'b'
			maxi -= 1
		prev = li + li1
		print(prev)
while test:
	solve()
	test -= 1


t = int(input())

def r(ai, i):
	char = 'b' if ai[i] == 'a' else 'a'
	return char
for case in range(t):
	n = int(input())
	row = [int(x) for x in input().split()]
	if row[0] > 0:
		ai = 'a' * row[0]
	else:
		ai = 'a'
	strings = []
	for i in range(n):
		if row[i] == 0:
			ai1 = r(ai, 0)
		elif len(ai) > row[i]:
			ai1 = ai[:row[i]] + r(ai, row[i])
		elif len(ai) < row[i]:
			ai += 'a' * (row[i] - len(ai))
			ai1 = ai + r(ai, len(ai) - 1)
		else:
			ai1 = ai + r(ai, len(ai) - 1)
		strings.append(ai)
		ai = ai1
	strings.append(ai1)
	for string in strings:
		print(string)


def solve(a, n):
	max_len = max(a)
	ans = ['a' * (max_len + 1)] * (n + 1)
	for (i, x) in enumerate(a):
		who = 'a' if ans[i][x] == 'b' else 'b'
		ans[i + 1] = ans[i][:x] + who + ans[i][x + 1:]
	print('\n'.join(ans))
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(x) for x in input().split()]
	solve(a, n)


for _ in range(int(input())):
	n = input()
	a = [int(__) for __ in input().split()]
	shit = []
	shit.append('a' * (max(a) + 2))
	for i in a:
		ans = shit[-1][:i]
		if shit[-1][i] == 'a':
			ans += 'b' * (max(a) - i + 2)
		else:
			ans += 'a' * (max(a) - i + 2)
		shit.append(ans)
	for i in shit:
		print(i)


import os
import sys
from io import BytesIO, IOBase

def nxtChar(ch):
	return chr(97 + (ord(ch) + 1 - 97) % 26)

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		nums = list(map(int, input().split()))
		ans = ['a' * 60 for _ in range(n + 1)]
		for i in range(n):
			prefix = nums[i]
			if prefix == 0:
				ans[i + 1] = nxtChar(ans[i][0]) + 'a' * 59
			else:
				ans[i + 1] = ans[i][:prefix] + nxtChar(ans[i][prefix]) + ans[i][prefix + 1:]
		for word in ans:
			print(word)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


for test in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	ans = ['a' * 200]
	tt = ['a'] * 200
	for i in range(n):
		if a[i] < 200:
			if tt[a[i]] == 'b':
				tt[a[i]] = 'a'
			else:
				tt[a[i]] = 'b'
		ans.append(''.join(tt))
	for i in ans:
		print(i)


import sys, string, random
input = sys.stdin.readline
t = int(input())
letters = string.ascii_lowercase
for tt in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	ans = []
	for i in range(n + 1):
		ans.append(['a'] * 51)
	for i in range(n):
		temp = ans[i + 1]
		temp[:l[i]] = ans[i][:l[i]]
		tempchar = ans[i][l[i]]
		for j in letters:
			if j != tempchar:
				temp[l[i]] = j
				break
		ans[i + 1] = temp
	for i in ans:
		for j in i:
			print(j, end='')
		print()


t = int(input())
res = []
alphs = 'abcdefghijklmnopqrstuvwxyz'
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	initialStr = alphs[0] * 51
	currRes = [initialStr]
	for j in range(1, len(a) + 1):
		appendString = None
		if a[j - 1] == 0:
			appendString = alphs.replace(currRes[j - 1][0], '')[0] * 50
		else:
			appendString = currRes[j - 1][:a[j - 1]] + alphs.replace(currRes[j - 1][a[j - 1] - 1], '').replace(currRes[j - 1][a[j - 1]], '')[0] * 50
		currRes += [appendString]
	res += [currRes]
for i in res:
	for j in i:
		print(j)


def alter(c):
	if c == 'a':
		return 'b'
	return 'a'
for _ in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	a = ['a'] * 51
	print(''.join(a))
	for i in li:
		a[i] = alter(a[i])
		print(''.join(a))


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = ''
	t = ''
	x = l[0]
	c = 'a'
	liststr = [0 for i in range(n + 1)]
	if x == 0:
		s = 'a'
		t = 'b'
	else:
		for i in range(x):
			s += c
			t += c
	liststr[0] = s
	liststr[1] = t
	for i in range(2, n + 1):
		x = l[i - 1]
		s = ''
		lt = len(t)
		if x == 0:
			v = liststr[i - 1][0]
			liststr[i] = chr((ord(v) - 97 + 1) % 26 + 97)
			s = liststr[i]
		elif x <= lt:
			for j in range(x):
				s += t[j]
			liststr[i] = s
		else:
			for j in range(lt):
				s += t[j]
			c = chr((ord(c) - 97 + 1) % 26 + 97)
			for j in range(x - lt):
				t += c
				s += c
			liststr[i] = s
			liststr[i - 1] = t
		t = s
	for i in liststr:
		print(i)


t = int(input())
for q in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	maxlen = max(a)
	prev = 'a' * max(maxlen, 1)
	print(prev)
	for i in range(1, n + 1):
		current = ''
		for j in range(a[i - 1]):
			current += prev[j]
		if maxlen - a[i - 1] > 0 and prev[len(current)] == 'a':
			current += 'b' * (maxlen - a[i - 1])
		else:
			current += 'a' * (maxlen - a[i - 1])
		if current == '':
			if prev == '' or prev[0] == 'a':
				current = 'b'
			if prev == '' or prev[0] == 'b':
				current = 'a'
		prev = current
		print(prev)


import random
import string
t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	a = [int(j) for j in input().split()]
	temp = max(a)
	b = []
	res = ''.join(random.choices(string.ascii_lowercase, k=temp))
	if res == '':
		res = ''.join(random.choices(string.ascii_lowercase, k=5))
		temp = 5
	b.append(res)
	for i in range(len(a)):
		temp2 = b[i][:a[i]]
		while True:
			res = ''.join(random.choices(string.ascii_lowercase, k=temp - a[i]))
			if res == '':
				b.append(temp2)
				break
			elif res[0] != b[i][a[i]]:
				temp2 = temp2 + res
				b.append(temp2)
				break
	for i in b:
		print(i)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	x = max(a)
	s1 = 'a' * (x + 1)
	print(s1)
	for i in range(n):
		b = a[i]
		if s1[b] == 'a':
			s1 = s1[:b] + 'b' + s1[b + 1:]
		else:
			s1 = s1[:b] + 'a' + s1[b + 1:]
		print(s1)


rr = lambda : input()
rri = lambda : int(input())
rrm = lambda : list(map(int, input().split()))
INF = float('inf')
(YES, NO) = ('YES', 'NO')
(FIRST, SECOND) = ('FIRST', 'SECOND')

def solve(N, A):
	maxlen = 52
	prev = 'a' * maxlen
	print(prev)
	for v in A:
		garbage = chr((ord(prev[v]) - ord('a') + 1) % 26 + ord('a'))
		cur = prev[:v] + garbage * (maxlen - v)
		print(cur)
		prev = cur
t = rri()
for _ in range(t):
	N = rri()
	A = rrm()
	solve(N, A)


for testcases in range(int(input())):
	num = int(input())
	lis = list(map(int, input().split()))
	maxi = max(lis)
	st = 'a' * (maxi + 1)
	print(st)
	for i in range(num):
		if st[lis[i]] == 'a':
			st = st[:lis[i]] + 'b' + st[lis[i] + 1:]
		else:
			st = st[:lis[i]] + 'a' + st[lis[i] + 1:]
		print(st)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	ans = [list('a' * 200)]
	print('a' * 200)
	for i in range(n):
		b = ans[-1]
		if b[a[i]] == 'b':
			b[a[i]] = 'a'
		else:
			b[a[i]] = 'b'
		for ch in b:
			print(ch, end='')
		ans.append(b)
		print()


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	s = []
	if a[0] != 0:
		temp = ''
		for i in range(a[0]):
			temp += 'a'
		s.append(temp)
		s.append(temp)
		count = 1
	else:
		s.append('a')
		s.append('b')
		count = 3
	b = 'abcdefghijklmnopqrstuvwxyz'
	for i in range(1, n):
		if a[i] >= a[i - 1] and a[i] != 0 and (a[i - 1] != 0):
			temp = s[-1]
			for i in range(a[i] - a[i - 1]):
				temp += b[count % 25]
			if temp != s[-1]:
				count += 1
				count = count % 25
			s[-1] = temp
			s.append(temp)
		elif a[i - 1] == 0 and a[i] != 0:
			temp = s[-1]
			for i in range(a[i] - a[i - 1] - 1):
				temp += b[count % 25]
			if temp != s[-1]:
				count += 1
				count = count % 25
			s[-1] = temp
			s.append(temp)
		elif a[i] != 0:
			temp = s[-1][:a[i]]
			s.append(temp)
		else:
			s.append(b[count % 25])
			count += 1
			count = count % 25
	for i in s:
		print(i)


t = int(input())
a = []
for i in range(t):
	n = int(input())
	x = []
	x.extend(input().split())
	for j in range(n):
		x[j] = int(x[j])
	a.append(x)
for i in range(len(a)):
	s = []
	for j in range(200):
		s.append('a')
	for j in range(200):
		print(s[i], end='')
	print()
	for j in range(len(a[i])):
		if s[a[i][j]] == 'b':
			s[a[i][j]] = 'a'
		else:
			s[a[i][j]] = 'b'
		for j in range(200):
			print(s[j], end='')
		print()


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
import copy

def gift():
	for _ in range(t):
		n = input()
		arry = list(map(int, input().split()))
		ans = []
		maxlen = max(arry)
		ans.append(['a'] * (maxlen + 1))
		for (i, ele) in enumerate(arry):
			lastele = ans[-1]
			temp = copy.deepcopy(lastele)
			temp[ele] = chr((ord(temp[ele]) + 1 - ord('a')) % 26 + ord('a'))
			ans.append(temp)
		for ina in ans:
			yield ''.join(ina)
t = int(input())
ans = gift()
print(*ans, sep='\n')


def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s)])

def invr():
	return map(int, input().split())
n = inp()
for _ in range(n):
	m = inp()
	l = inlt()
	ans = []
	c = 'a'
	s = ['a'] * 52
	ans.append(s)
	for x in l:
		tmp = list(ans[-1])
		if ord(tmp[x]) + 1 > ord('z'):
			tmp[x] = 'a'
		else:
			tmp[x] = chr(ord(tmp[x]) + 1)
		ans.append(tmp)
	for x in ans:
		res = ''
		for y in x:
			res += y
		print(res)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans = []
	x = max(a)
	x = max(x, 1)
	ans.append('a' * x)
	for i in a:
		if i == x:
			ans.append(ans[-1])
			continue
		if ans[-1][i] == 'a':
			s = ans[-1][:i] + 'b' + ans[-1][i + 1:]
		else:
			s = ans[-1][:i] + 'a' + ans[-1][i + 1:]
		ans.append(s)
	for i in ans:
		print(i)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	length = max(a) if max(a) > 0 else 1
	prev_c = 'a'
	prev = [prev_c] * length
	print(''.join(prev))
	for i in range(n):
		next_c = chr((ord(prev[-1]) - ord('a') + 1) % 26 + ord('a'))
		next = [next_c] * length
		for j in range(a[i]):
			next[j] = prev[j]
		print(''.join(next))
		prev = next


for _ in range(int(input())):
	n = int(input())
	lis = list(map(int, input().split()))
	ans = ['a' * 105]
	for i in range(n):
		st = ans[-1][:lis[i]]
		if ans[-1][lis[i]] == 'b':
			st += 'a' * (105 - lis[i])
		else:
			st += 'b' * (105 - lis[i])
		ans.append(st)
	for i in ans:
		print(i)


def flip(arr, i):
	prev = arr[:i]
	nxt = ''
	for j in range(i, 200):
		if arr[j] == 'a':
			nxt = nxt + 'b'
		else:
			nxt = nxt + 'a'
	return prev + nxt
t = int(input())
for test in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	arr = []
	arr.append('a' * 200)
	for i in l:
		temp = arr[-1]
		arr.append(flip(temp, i))
	for i in arr:
		print(i)


t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	maxA = max(A)
	s = 'a' * (maxA + 1)
	print(s)
	for i in range(n):
		if s[A[i]] != 'b':
			s_next = s[:A[i]] + 'b' * (maxA - A[i] + 1)
		else:
			s_next = s[:A[i]] + 'a' * (maxA - A[i] + 1)
		print(s_next)
		s = s_next


def largestPrefixLength(s1, s2):
	result = 0
	for i in range(min(len(s1), len(s2))):
		if s1[i] == s2[i]:
			result += 1
		else:
			break
	return result

def check(arr, result):
	print(result)
	assert len(result) == len(arr) + 1
	for i in range(len(arr)):
		k = largestPrefixLength(result[i], result[i + 1])
		assert k == arr[i]
import string
stringMap = {i: c for (i, c) in enumerate(string.ascii_lowercase)}

def charToNum(c):
	return ord(c) - 96

def fast(n, arr):
	result = ['z' * (max(arr) + 1)]
	for num in arr:
		curr = list(result[-1][:])
		curr[num] = 'a' if curr[num] == 'z' else 'z'
		result.append(''.join(curr))
	return result

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		arr = [int(x) for x in input().split()]
		result = fast(n, arr)
		for row in result:
			print(row)
import random

def test():
	arr = [4, 1, 4, 1]
	n = len(arr)
	result = fast(n, arr)
	print(result)
	check(arr, result)

def randomTest():
	while True:
		n = random.randint(1, 4)
		arr = [random.randint(0, 4) for _ in range(n)]
		result = fast(n, arr)
		print(arr, result)
		check(arr, result)
main()


t = int(input())
for case in range(t):
	n = int(input())
	a = input().split()
	prev = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
	print(prev)
	for i in range(n):
		s = ''
		s = s + prev[:int(a[i])]
		if prev[int(a[i])] == 'a':
			s += 'b'
		else:
			s += 'a'
		for j in range(int(a[i]), 50):
			s += 'a'
		print(s)
		prev = s


from sys import stdin
input = stdin.buffer.readline
for _ in range(int(input())):
	n = int(input())
	(*a,) = map(int, input().split())
	s = 'a' * 51
	print(s)
	for i in a:
		s = s[:i] + (chr(ord(s[i]) + 1) if ord(s[i]) < ord('z') else chr(ord(s[i]) - 2)) * (51 - i)
		print(s)


def con(p):
	if p == 'a':
		return 'b'
	else:
		return 'a'
for _ in range(int(input())):
	n = int(input())
	s = list('abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxy')
	a = list(map(int, input().split()))
	x = []
	for k in range(n + 1):
		v = s.copy()
		x.append(v)
	for j in range(n):
		for o in range(0, 50):
			if a[j] <= o:
				x[j + 1][o] = con(x[j][o])
				break
			x[j + 1][o] = x[j][o]
	for i in x:
		print(''.join(i))


n = int(input())
for i in range(n):
	t = int(input())
	arr = [int(i) for i in input().split()]
	a = max(arr)
	ans = ['a'] * (a + 1)
	print(''.join(ans))
	for i in range(t):
		if ans[arr[i]] == 'a':
			ans[arr[i]] = 'b'
		else:
			ans[arr[i]] = 'a'
		print(''.join(ans))


t = int(input())
for _ in range(t):
	n = int(input())
	list1 = list(map(int, input().strip().split()))
	a = []
	for i in range(50 + 1):
		a.append('a')
	for val in a:
		print(val, end='')
	print()
	for i in range(n):
		index = list1[i]
		if a[index] == 'a':
			a[index] = 'b'
		else:
			a[index] = 'a'
		for val in a:
			print(val, end='')
		print()


def main():
	n = int(input())
	a = list(map(int, input().split()))
	mx = max(a)
	ans = ['a' * (mx + 10)] * (n + 1)
	for i in range(len(a)):
		change = 'a' if ans[i][a[i]] == 'b' else 'b'
		ans[i + 1] = ans[i][:a[i]] + change + ans[i][a[i] + 1:]
	print('\n'.join(ans))
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
	return
test()


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans = ['a' * 50]
	for j in range(n):
		k = 0
		temp = ''
		while k < a[j]:
			temp = temp + ans[j][k]
			k += 1
		if k < 50:
			ch = ans[j][k]
			if ch == 'z':
				ch = 'a'
			else:
				ch = chr(ord(ch) + 1)
			while k < 50:
				temp = temp + ch
				k += 1
		ans.append(temp)
	for j in ans:
		print(j)


alphas = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for _ in range(eval(input())):
	length = eval(input())
	commons = list(map(int, input().split()))
	wordList = []
	word = ''
	for letterIndex in range(commons[0]):
		word += alphas[letterIndex % 26]
	if commons[0] == 0:
		wordList.append('a')
	else:
		wordList.append(word)
	for i in range(length - 1):
		word = ''
		if commons[i] == 0 and commons[i + 1] == 0:
			if i == 0:
				wordList.append('b')
			else:
				letter = wordList[len(wordList) - 1][0]
				changedLetter = alphas[(alphas.index(letter) + 1) % 26]
				wordList.append(changedLetter)
		elif commons[i] < commons[i + 1]:
			word = wordList[len(wordList) - 1][:commons[i]]
			elseCount = 0
			for num in range(commons[i], commons[i + 1]):
				if len(wordList[len(wordList) - 1]) > num:
					letter = wordList[len(wordList) - 1][num]
					changedLetter = alphas[(alphas.index(letter) + 1) % 26]
					word += changedLetter
				else:
					word += alphas[elseCount]
					elseCount += 1
			wordList.append(word)
		else:
			wordList.append(wordList[len(wordList) - 1][:commons[i]])
	if commons[len(commons) - 1] == 0:
		letter = wordList[len(wordList) - 1][0]
		changedLetter = alphas[(alphas.index(letter) + 1) % 26]
		wordList.append(changedLetter)
	else:
		wordList.append(wordList[len(wordList) - 1][:commons[len(commons) - 1]])
	for word in wordList:
		print(word)


T = int(input())
for case in range(1, T + 1):
	N = int(input())
	arr = [int(x) for x in input().split()]
	ch = 0
	res = [''] * (N + 1)
	res[0] = max(1, arr[0]) * chr(97 + ch)
	if arr[0] == 0:
		ch += 1
		ch = ch % 26
	res[1] = max(1, arr[0]) * chr(97 + ch)
	for i in range(1, N):
		if arr[i] == 0:
			ch += 1
			ch = ch % 26
			res[i + 1] = chr(97 + ch)
			ch += 1
			ch = ch % 26
		elif arr[i] > len(res[i]):
			ch += 1
			ch = ch % 26
			temp = res[i]
			while True:
				res[i] = temp + chr(97 + ch) * (arr[i] - len(res[i]))
				if res[i - 1][:len(res[i])] != res[i]:
					break
				ch += 1
				ch = ch % 26
			res[i + 1] = res[i]
		else:
			res[i + 1] = res[i][:arr[i]]
	for s in res:
		print(s)


t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	(asc, i) = (97, 0)
	if a[0] == 0:
		ans = 'a'
	else:
		ans = 'a' * a[0]
	print(ans)
	while i < n - 1:
		if a[i + 1] > a[i]:
			asc += 1
			if asc > 122:
				asc = 97
			ans = ans[:a[i]] + chr(asc) * (a[i + 1] - a[i])
			print(ans)
		else:
			ans = ans[:a[i]]
			if a[i] == 0:
				asc += 1
				if asc > 122:
					asc = 97
				ans = chr(asc)
			print(ans)
		i += 1
	ans = ans[:a[n - 1]]
	if a[n - 1] == 0:
		if asc > 122:
			asc = 97
		ans = chr(asc + 1)
	print(ans)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = 'a' * 51
	o = list(s)
	print(''.join(o))
	for i in l:
		if o[i] == 'a':
			o[i] = 'b'
			print(''.join(o))
			continue
		o[i] = 'a'
		print(''.join(o))


t = int(input())
for _ in range(t):
	n = int(input())
	a = input().split(' ')
	a = [int(x) for x in a]
	mx = max(a)
	st = 'a' * 200
	print(st)
	d = {'a': 'b', 'b': 'a'}
	for i in a:
		st = st[0:i] + d[st[i]] + (200 - i - 1) * 'b'
		print(st)


def pr(l):
	print(''.join(['a' if i else 'b' for i in l]))
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	x = [True] * 60
	pr(x)
	for i in l:
		tmp = [i for i in x]
		tmp = x[:i] + [not j for j in x[i:]]
		pr(tmp)
		x = tmp


TC = int(input())
for tc in range(TC):
	N = int(input())
	a = list(map(int, input().split()))
	prev_s = 'a' * 50
	print(prev_s)
	for i in range(len(a)):
		common_prefix = a[i]
		cur_s = ''
		for j in range(50):
			if j < common_prefix:
				cur_s += prev_s[j]
			else:
				cur_s += 'b' if prev_s[j] == 'a' else 'a'
		print(cur_s)
		prev_s = cur_s


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	ans = max(l)
	st = ''
	for i in range(ans + 1):
		st += 'a'
	print(st)
	s = st
	for i in l:
		ans = ''
		ans += s[:i]
		if s[i] == 'a':
			ans += 'b'
		else:
			ans += 'a'
		ans += s[i + 1:]
		print(ans)
		s = ans


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	res = []
	for i in range(n):
		if not res:
			if arr[i] > 0:
				res.append('a' * arr[i])
				res.append('a' * arr[i])
			else:
				res.append('a')
				res.append('b')
		else:
			x = res[-1]
			if arr[i] != 0:
				if arr[i] >= len(x):
					res[-1] = x + 'a' * (arr[i] - len(x))
					res.append(res[-1])
				else:
					temp = x[:arr[i]]
					if x[arr[i]] == 'a':
						res.append(temp + 'b')
					else:
						res.append(temp + 'a')
			elif x[0] == 'a':
				res.append('b')
			else:
				res.append('a')
	for i in res:
		print(i)


alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
t = int(input())
for _ in range(t):
	n = int(input())
	data = list(map(int, input().split()))
	count = 1
	s = 'a' * max(1, data[0])
	print(s)
	for i in range(1, n):
		pre = min(data[i - 1], len(s))
		own = data[i]
		if count % 26 == 0:
			count = 1
		s = s[:pre] + alpha[count % 26] * own
		if len(s) == 0:
			if count % 26 == 0:
				count = 1
			s = alpha[count % 26]
		count += 1
		print(s)
	if data[n - 1] == 0:
		if count % 26 == 0:
			count = 1
		print(alpha[count % 26])
	else:
		print(s[:data[n - 1]])


t = int(input())
for _ in range(t):
	n = int(input())
	lol = [int(n) for n in input().split()]
	maxi = max(lol)
	ans = []
	for i in range(maxi + 1):
		ans.append('y')
	print(''.join(map(str, ans)))
	for i in range(n):
		for j in range(lol[i], maxi + 1):
			if ans[j] == 'y':
				ans[j] = 'z'
			else:
				ans[j] = 'y'
		print(''.join(map(str, ans[:maxi + 1])))


t = int(input())
for i in range(t):
	n = int(input())
	li = list(map(int, input().split()))
	s = 'a' * 200
	st = 1
	print(s)
	for j in li:
		sn = s[:j] + chr(st % 26 + 97) * (200 - j)
		if sn[j] == s[j]:
			o = ord(s[j]) - 97
			o = (o + 1) % 26
			ch = chr(o + 97)
			sn = s[:j] + ch + chr(st % 26 + 97) * (200 - j - 1)
		s = sn
		st += 1
		print(s)


import sys, math
import io, os
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter

def data():
	return sys.stdin.readline().strip()

def mdata():
	return list(map(int, data().split()))

def outl(var):
	sys.stdout.write('\n'.join(map(str, var)) + '\n')

def out(var):
	sys.stdout.write(str(var) + '\n')
from fractions import Fraction
INF = float('inf')
mod = int(1000000000.0) + 7
for t in range(int(data())):
	n = int(data())
	a = mdata()
	ans = ['a' * 51]
	for i in range(n):
		ans.append(ans[-1][:a[i]] + chr((ord(ans[-1][a[i]]) + 1 - 97) % 2 + 97) * (51 - a[i]))
	outl(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	ar = list(map(int, input().split()))
	m = max(ar)
	ss = 'abcdefghijklmnopqrstuvwxyz'
	st = 'a' * (m + 1)
	print(st)
	k = 1
	for a in ar:
		k = ord(st[a]) - 96
		if k == 26:
			k = 0
		st = st[:a] + ss[k] + st[a + 1:]
		print(st)


t = int(input())
for loop in range(t):
	n = int(input())
	ovrlaps = list(map(int, input().split()))
	if ovrlaps[0]:
		print(ovrlaps[0] * 'a')
	string = 'a' * ovrlaps[0]
	if ovrlaps[0] == 0:
		print('a')
		string = 'a'
	for i in range(n - 1):
		newstring = string[:ovrlaps[i]]
		if ovrlaps[i] == 0:
			if string[0] == 'a':
				newstring = 'b'
				string = newstring
			else:
				newstring = 'a'
				string = newstring
		if ovrlaps[i + 1] > ovrlaps[i]:
			if len(string) > ovrlaps[i]:
				if string[ovrlaps[i]] == 'a':
					newstring += 'b' * (ovrlaps[i + 1] - ovrlaps[i])
					string = newstring
				else:
					newstring += 'a' * (ovrlaps[i + 1] - ovrlaps[i])
					string = newstring
				if ovrlaps[i] == 0:
					string = string[:-1]
			else:
				newstring += 'a' * (ovrlaps[i + 1] - ovrlaps[i])
				string = newstring
		string = newstring
		print(string)
	if ovrlaps[n - 1]:
		print(string[:ovrlaps[n - 1]])
	elif string[0] == 'a':
		print('b')
	else:
		print('a')


import sys
input = sys.stdin.readline
t = int(input())
alpha = [chr(98 + i) for i in range(25)]
alpha = alpha * 300
for _ in range(t):
	n = int(input())
	nList = list(map(int, input().split()))
	masterkey = 'abcdefghijklmnopqrstuvwxyz' * 2
	sList = ['a' * 50]
	for i in range(n):
		num = nList[i]
		sList.append(sList[i][:num] + alpha[i] + sList[i][num:])
	for s in sList:
		print(s[:200])


l = 200
for i in range(int(input())):
	n = int(input())
	ans = []
	arr = [int(i) for i in input().split()]
	ans.append('a' * l)
	for i in range(0, n):
		nextc = (ord(ans[-1][arr[i]]) + 1 - ord('a')) % 26
		nextc = nextc + ord('a')
		ans.append(ans[-1][0:arr[i]] + chr(nextc) * (l - arr[i]))
	for x in ans:
		print(x)


def nextChar(ch):
	return chr((ord(ch) - ord('a') + 1) % 26 + ord('a'))

def calc(s, i):
	return s[0:i] + nextChar(s[i]) * (len(s) - i)

def go(a):
	ans = ['a' * (1 + max(a))]
	for i in a:
		ans.append(calc(ans[-1], i))
	return ans
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans = go(a)
	for s in ans:
		print(s)


def main():
	for _ in range(int(input())):
		n = int(input())
		l = [int(x) for x in input().split()]
		f = ['a'] * 55
		print(''.join(f))
		for i in l:
			s = ord(f[i]) + 1
			if s >= 122:
				s = 100
			f[i] = chr(s)
			print(''.join(f))
main()


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	s = ['' for m in range(n + 1)]
	x = max(a)
	s[0] = ''
	for i in range(a[0]):
		s[0] += 'a'
	if a[0] <= x:
		for j in range(a[0], x + 1):
			s[0] += 'b'
	for l in range(1, n + 1):
		s[l] += s[l - 1][:a[l - 1]]
		if s[l - 1][a[l - 1]] == 'a':
			s[l] += 'b'
		elif s[l - 1][a[l - 1]] == 'b':
			s[l] += 'c'
		elif s[l - 1][a[l - 1]] == 'c':
			s[l] += 'a'
		if a[l - 1] + 1 <= x:
			for m in range(a[l - 1] + 1, x + 1):
				if l % 2 == 0:
					s[l] += 'b'
				else:
					s[l] += 'c'
	for ss in s:
		print(ss)


def solve():
	n = int(input())
	a = list(map(int, input().split()))
	M = max(a) + 1
	s = [ord('a')] * M
	out = list(map(chr, s))
	print(''.join(out))
	for i in range(n):
		pref = a[i]
		for j in range(pref, M):
			if s[j] >= ord('z'):
				s[j] -= 1
			else:
				s[j] += 1
		out = list(map(chr, s))
		print(''.join(out))
t = int(input())
for test in range(t):
	solve()


import os
import sys, math
from io import BytesIO, IOBase

def main():
	t = int(input())
	for case in range(t):
		n = int(input())
		l = list(map(int, input().split()))
		mx = max(max(l), 1)
		ans = []
		ans.append(list('a' * mx))
		for i in range(n):
			toapp = list(ans[-1])
			for j in range(l[i]):
				toapp[j] = ans[-1][j]
			if l[i] != mx:
				prev = ans[-1][l[i]]
				if prev == 'a':
					toapp[l[i]] = 'z'
				else:
					toapp[l[i]] = 'a'
			ans.append(toapp)
		for i in range(n + 1):
			for j in range(mx):
				print(ans[i][j], end='')
			print()
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def next_char(c):
	if c == 'z':
		return 'a'
	else:
		return chr(ord(c) + 1)
t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	length = max(arr)
	if length == 0:
		length = n
	currstring = 'a' * length
	print(currstring)
	for a in arr:
		firstpart = currstring[0:a]
		secondpart = ''
		for c in currstring[a:]:
			secondpart += next_char(c)
		currstring = firstpart + secondpart
		print(currstring)


for _ in range(int(input())):
	n = int(input())
	a = ['']
	for x in map(int, input().split()):
		if len(a[-1]) < x + 1:
			a[-1] += 'a' * (x + 1 - len(a[-1]))
		s = a[-1][:x] + ('b' if a[-1][x] == 'a' else 'a')
		a += (s,)
	print('\n'.join(a))


for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	s = ['a' for _ in range(200)]
	print(''.join(s))
	for i in a:
		if i != 200:
			s[i] = chr(97 + (ord(s[i]) - 96) % 26)
		print(''.join(s))


def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		a = tuple(map(int, input().split()))
		result_strings = _restore_strings(a)
		print(*result_strings, sep='\n')

def _restore_strings(common_prefixes_lengths):
	if not common_prefixes_lengths:
		return ['a']
	strings_chars = [['a'] * common_prefixes_lengths[0]]
	for prefix_length in common_prefixes_lengths:
		prev_string_chars = strings_chars[-1]
		if prefix_length <= len(prev_string_chars):
			strings_chars.append(prev_string_chars[:prefix_length])
			continue
		new_string = prev_string_chars.copy()
		if len(strings_chars) < 2 or len(strings_chars[-2]) <= len(new_string):
			fill_char = 'a'
		else:
			forbidden_next_char = strings_chars[-2][len(new_string) - 1 + 1]
			fill_char = 'b' if forbidden_next_char == 'a' else 'a'
		new_string += [fill_char] * (prefix_length - len(new_string))
		prev_string_chars[:] = new_string
		strings_chars.append(new_string)
	for (i, chars) in enumerate(strings_chars):
		if not chars:
			fill_char = 'c' if i % 2 == 0 else 'd'
			chars[:] = [fill_char]
	return list(map(''.join, strings_chars))
main()


T = int(input())

def main():
	n = int(input())
	arr = list(map(int, input().split()))
	string = 'a' * 200
	result = [string]
	prev = string
	for i in range(n):
		new_string = prev
		opp = prev[arr[i]]
		if opp == 'a':
			opp = 'b'
		else:
			opp = 'a'
		new_string = prev[:arr[i]] + opp * (200 - arr[i])
		prev = new_string
		result.append(new_string)
	for string in result:
		print(string)
for i in range(T):
	main()


t = int(input())

def ne(s, k):
	new = s[:k]
	for val in range(k, len(s)):
		if s[val] == 'z':
			new += 'a'
		else:
			new += chr(ord(s[val]) + 1)
	return new
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	first = 'a' * (max(arr) + 2)
	ans = []
	ans.append(first)
	for some in arr:
		ans.append(ne(ans[-1], some))
	for row in ans:
		print(row)


T = int(input())
a = ord('a')
alph = [chr(i) for i in range(a, a + 26)]

def solve():
	ind = 0
	if a[0] == 0:
		curr = alph[ind]
		print(curr)
	else:
		curr = alph[ind] * a[0]
		print(curr)
	for i in range(n - 1):
		if a[i] == 0:
			ind = (ind + 1) % 26
			if a[i + 1] == 0:
				curr = alph[ind]
				print(curr)
			else:
				curr = alph[ind] * a[i + 1]
				print(curr)
		elif a[i + 1] > a[i]:
			ind = (ind + 1) % 26
			curr = curr[:a[i]] + alph[ind] * (a[i + 1] - a[i])
			print(curr)
		else:
			print(curr[:a[i]])
	if a[n - 1] == 0:
		ind = (ind + 1) % 26
		curr = alph[ind]
		print(curr)
	else:
		print(curr[:a[n - 1]])
for test in range(T):
	n = int(input())
	a = [int(x) for x in input().split()]
	solve()


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	x = 'a' * 50
	j = 1
	print(x)
	for i in range(1, n + 1):
		y = x[:a[i - 1]]
		if a[i - 1] != 50:
			j += 1
		print(y + chr(j % 26 + 97) * (50 - len(y)))
		x = y + chr(j % 26 + 97) * (50 - len(y))


from sys import stdin, stdout
test = int(stdin.readline())
for _ in range(test):
	n = int(stdin.readline())
	a = [int(x) for x in stdin.readline().split()]
	maxx = max(a)
	s = list('a' * maxx)
	if maxx == 0:
		ans = [['a'] for i in range(n + 1)]
	else:
		ans = [s[:] for i in range(n + 1)]
	for i in range(n):
		ans[i + 1] = ans[i][:]
		if a[i] == maxx and maxx != 0:
			continue
		ans[i + 1][a[i]] = chr((ord(ans[i][a[i]]) + 1 - ord('a')) % 26 + ord('a'))
	for i in ans:
		print(''.join(i))


t = int(input())
for i in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	s = ['a' * 55]
	print(s[0])
	for j in range(n):
		s.append(s[j][:a[j]])
		s[-1] += ''.join(['b' if k == 'a' else 'a' for k in s[j][a[j]:]])
		print(s[-1])


t = int(input())
for i in range(0, t):
	m = int(input())
	ar = list(map(int, input().strip().split()))[:m]
	l = []
	str3 = ''
	str1 = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
	l.append(str1)
	for j in ar:
		str2 = str1[0:j]
		if str1[j] != str1[-1]:
			str2 = str2[0:] + str1[::-1]
		else:
			str2 = str2[0:] + str2[-1] + str1[::-1]
		str1 = str2[0:52]
		str2 = str2[0:52]
		l.append(str2)
	for j in l:
		print(j)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def IF(c, t, f):
	return t if c else f

def YES(c):
	return IF(c, 'YES', 'NO')

def main():
	t = I()
	rr = []
	for _ in range(t):
		n = I()
		a = LI()
		l = max(1, max(a))
		r = [['a'] * l]
		for c in a:
			if c == l:
				r.append(r[-1][:])
			else:
				t = r[-1][:]
				t[c] = chr(ord(t[c]) ^ 2)
				r.append(t)
		rr.append(JAA(r, '\n', ''))
	return JA(rr, '\n')
print(main())


t = int(input())
for i in range(t):
	n = int(input())
	a = list(map(int, input().split(' ')))
	s = 'a' * (max(a) + 1)
	e = 'b' * (max(a) + 1)
	k = s
	print(k)
	for j in range(len(a)):
		if k[a[j]] == 'a':
			k = k[:a[j]] + e[a[j]:]
		else:
			k = k[:a[j]] + s[a[j]:]
		print(k)


t = int(input())
while t:
	t -= 1
	n = int(input())
	arr = list(map(int, input().split()))
	list1 = ['a'] * 200
	print(''.join(list1))
	for i in arr:
		if list1[i] == 'a':
			list1[i] = 'b'
			print(''.join(list1))
		else:
			list1[i] = 'a'
			print(''.join(list1))


for i in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = max(l)
	res = ['a'] * (s + 1)
	print(''.join(res))
	for j in l:
		if res[j] == 'a':
			res[j] = 'b'
		else:
			res[j] = 'a'
		print(''.join(res))


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	length = max(a)
	length = max(length, 2)
	current = ''
	l = ['a' for _ in range(length)]
	current = current.join(l)
	print(current)
	for i in range(n):
		common = a[i]
		start = current[:common]
		middle = ''
		if common < length:
			if current[common] == 'a':
				middle = 'b'
			else:
				middle = 'a'
		final = ''
		tail = ''
		temp = ['a' for _ in range(length - common - 1)]
		tail = tail.join(temp)
		current = final.join([start, middle, tail])
		print(current)


for _ in range(int(input())):
	n = int(input())
	s = 'wertyuiopasdfghjklzxcvbnm'
	a = []
	for i in s:
		a.append(i * 50)
	a += a
	a += a
	a += a
	a += a
	arr = [int(c) for c in input().split()]
	ans = ['q' * 50]
	for i in range(len(arr)):
		b = arr[i]
		news = ans[-1][:b] + a[i]
		ans.append(news)
	print(*ans, sep='\n')


T = int(input())
while T > 0:
	n = int(input())
	arr = list(map(int, input().split()))
	prev = ['a']
	for i in range(n):
		temp = []
		for j in range(arr[i]):
			if j >= len(prev):
				prev.append('a')
				temp.append('a')
			else:
				temp.append(prev[j])
		if len(temp) < len(prev):
			x = len(temp)
			for j in range(x, len(prev)):
				y = ord(prev[j]) + 1
				if y == 123:
					y = 97
				temp.append(chr(y))
		print(''.join(prev))
		prev = temp.copy()
	print(''.join(prev))
	T -= 1


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	if l.count(0) == n:
		for i in range(n + 1):
			if i % 2:
				print('a')
			else:
				print('b')
		continue
	(m, arr) = (max(l), [])
	for i in range(n + 1):
		if arr:
			(count, string) = (0, '')
			for j in range(l[i - 1]):
				string += arr[-1][j]
				count += 1
			try:
				if arr[-1][l[i - 1]] != 'a':
					string += 'a' * (m - count)
				else:
					string += 'b' * (m - count)
			except:
				pass
			arr.append(string)
			print(string)
		else:
			arr.append('a' * m)
			print(arr[-1])


def for_zero(i):
	characters = [ch for ch in 'bcdefghijklmnopqrstuvwxyz']
	return characters[i % 24]
for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	m = max(a)
	check = False
	if m == 0:
		first_string = 's' + 'a' * n
	else:
		first_string = 's' + 'a' * m
	print(first_string)
	for i in range(len(a)):
		if m == 0:
			first_string = first_string[0:a[i]] + for_zero(i + 1) * n
		else:
			first_string = first_string[0:a[i]] + for_zero(i) * m
		print(first_string)


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, k, m):
	res = 1
	while k > 0:
		if k % 2 == 1:
			res = res * a % m
		a = a * a % m
		k = k // 2
	return res % m

def solution():
	n = int(input())
	arr = list(map(int, input().split()))
	ans = ['a' * arr[0]]
	flag = False
	past = 'a' * arr[0]
	for i in range(1, n):
		st = past[:arr[i - 1]]
		g = max(arr[i - 1], arr[i])
		app = g - len(st)
		if len(past) > arr[i - 1] and past[arr[i - 1]] == 'a':
			flag = False
		else:
			flag = True
		if flag:
			st = st + 'a' * app
		else:
			st = st + 'b' * app
		ans.append(st)
		past = st
	ans.append(past[:arr[n - 1]])
	for i in ans:
		if i == '' and flag:
			flag = False
			print('g')
		elif i == '':
			print('h')
			flag = True
		if i != '':
			print(i)
for i in range(int(input())):
	solution()


from sys import stdin, stdout
input = lambda : stdin.readline().rstrip('\r\n')
from collections import deque as que, defaultdict as vector
from heapq import *
inin = lambda : int(input())
inar = lambda : list(map(int, input().split()))
Testcase = inin()
for _ in range(Testcase):
	n = inin()
	a = inar()
	print('a' * 120)
	prev = 'a' * 120
	for i in a:
		if prev[i] == 'a':
			prev = prev[0:i] + 'b' * (120 - i)
		elif prev[i] == 'b':
			prev = prev[0:i] + 'c' * (120 - i)
		else:
			prev = prev[0:i] + 'b' * (120 - i)
		print(prev)


import sys
t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	ans = ['' for x in range(n + 1)]
	var = 97
	if arr[0]:
		for i in range(arr[0]):
			ans[0] += 'a'
			ans[1] += 'a'
	else:
		ans[0] = 'a'
		var += 1
	for i in range(1, n):
		if var == 123:
			var = 97
		if arr[i] == 0:
			if ans[i] == '':
				ans[i] = chr(var)
			var += 1
			continue
		if arr[i] >= arr[i - 1]:
			for k in range(arr[i] - arr[i - 1]):
				ans[i] += chr(var)
			ans[i + 1] = ans[i]
		else:
			ans[i + 1] = ans[i][:arr[i]]
			var += 1
	if ans[-1] == '':
		ans[-1] = chr(var)
	for i in ans:
		print(i)


for _ in range(int(input())):
	n = int(input())
	array = list(map(int, input().split()))
	maximum = max(array)
	if maximum == 0:
		maximum = 3
	first = maximum * ['a']
	print(''.join(first))
	start = 'b'
	result = [first]
	for i in range(n):
		to_match = array[i]
		if to_match != 0:
			to = result[i][:to_match]
			if to_match != maximum:
				foo = result[i][:to_match + 1]
			else:
				foo = result[i][:to_match]
			if foo[-1] == 'a':
				start = 'b'
			else:
				start = 'a'
			to = ''.join(to)
			to = to + (maximum - to_match) * start
			print(to)
			result.append(to)
		else:
			to = result[i][0]
			if to == 'a':
				to = 'b'
			else:
				to = 'a'
			if to[-1] == 'a':
				start = 'b'
			else:
				start = 'a'
			to = ''.join(to)
			to = to + (maximum - to_match) * start
			print(to)
			result.append(to)


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	ma = max(a) + 1
	start = ['a' for i in range(ma)]
	print(''.join(start))
	for v in a:
		cur = start.copy()
		if start[v] == 'a':
			cur[v] = 'b'
		else:
			cur[v] = 'a'
		start = cur.copy()
		print(''.join(cur))


for _ in range(int(input())):
	n = int(input())
	a = [*map(int, input().split())]
	alpha = ['a' * i for i in range(1, 52)]
	p = max(a)
	cur = 'a'
	t = ['a'] * 200
	print(''.join(t))
	for i in range(n):
		if t[a[i]] == 'z':
			t[a[i]] = 'a'
		else:
			t[a[i]] = chr(ord(t[a[i]]) + 1)
		print(''.join(t))


test = int(input())

def update(k):
	if k < 25:
		k += 1
	else:
		k = 0
	return k
for i in range(test):
	n = int(input())
	arr = [int(i) for i in input().split()]
	ans = []
	t = max(max(arr), 1)
	ans = ['a' * t]
	for i in range(len(arr)):
		if arr[i] == t:
			ans.append(ans[-1])
		elif arr[i] == 0:
			if ans[-1][0] == 'a':
				ans.append('b' * t)
			else:
				ans.append('a' * t)
		else:
			st = ans[-1][:arr[i]]
			if ans[-1][arr[i]:][0] == 'b':
				st += 'a' * (t - arr[i])
				ans.append(st)
			else:
				st += 'b' * (t - arr[i])
				ans.append(st)
	for i in ans:
		print(i)


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		a = list(map(int, input().split()))
		maxi = max(a)
		ans = ['a' * (maxi + 1)] * (n + 1)
		for (i, x) in enumerate(a):
			me = 'a' if ans[i][x] == 'b' else 'b'
			ans[i + 1] = ans[i][:x] + me + ans[i][x + 1:]
		print('\n'.join(ans))
main()


def next(char):
	return chr((ord(char) - ord('a') + 1) % 26 + ord('a'))

def generate_curr_from_prev(prev: str, k: int):
	if k == 200:
		return prev
	else:
		return prev[:k] + next(prev[k]) + 'a' * (200 - k - 1)

def solve():
	n = int(input().strip())
	a = list(map(int, input().strip().split()))
	curr = 'a' * 200
	print(curr)
	prev = curr
	for i in range(n):
		curr = generate_curr_from_prev(prev, a[i])
		print(curr)
		prev = curr
t = int(input().strip())
for _ in range(t):
	solve()


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	s = 'a' * 51
	print(s)
	for i in range(n):
		temp = l[i]
		if s[temp] == 'a':
			s = list(s)
			s[temp] = 'b'
			s = ''.join(s)
		else:
			s = list(s)
			s[temp] = 'a'
			s = ''.join(s)
		print(s)


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	ans = 'a' * 50
	print(ans)
	for j in range(n):
		for z in range(50):
			if not z < l[j]:
				ans = ans[:z] + chr((ord(ans[z]) + 1) % 26 + ord('a')) + ans[z + 1:]
		print(ans)


import sys
input = sys.stdin.readline
alpha = [chr(ord('a') + i) for i in range(26)]
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	nax = max(a)
	if nax == 0:
		for i in range(n + 1):
			print(alpha[i % 26])
	else:
		ans = ['a'] * nax
		print(''.join(ans))
		for i in range(n):
			for j in range(a[i], nax):
				ans[j] = alpha[(alpha.index(ans[j]) + 1) % 26]
			print(''.join(ans))


for i in range(int(input())):
	l = input()
	s = 'ab' * 50
	letters = {'a', 'b'}
	print(s)
	for a in map(int, input().split()):
		s = ''.join([(letters & {s[i]}).pop() if i < a else (letters - {s[i]}).pop() for i in range(100)])
		print(s)


def commonPrefixes(n, array):
	m = max(max(array), 1)
	ans = ['a' * m]
	for x in range(n):
		e = ans[x][:array[x]]
		if array[x] < m:
			if ans[x][array[x]] == 'a':
				c = 'b'
			else:
				c = 'a'
			e += c * (m - array[x])
		ans.append(e)
	return ans
t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	ans = commonPrefixes(n, l)
	for x in ans:
		print(x)


t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	ans = []
	ans.append('a' * 200)
	for i in range(n):
		t = ans[-1]
		if t[A[i]] == 'z':
			c = 'a'
		else:
			j = ord(t[A[i]]) - ord('a') + 1
			c = chr(j + ord('a'))
		s = t[0:A[i]] + (200 - A[i]) * c
		ans.append(s)
	for i in range(n + 1):
		print(ans[i])


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	s = ''.join(['a'] * 200)
	print(s)
	for i in range(n):
		x = s[l[i]]
		if x == 'z':
			x = 'a'
		else:
			x = chr(ord(x) + 1)
		s = s[:l[i]] + x + s[l[i]:]
		s = s[:-1]
		print(s)


for _ in range(int(input())):
	N = int(input())
	List = [int(x) for x in input().split()]
	Max = max(List)
	Ans = ['a' * (Max + 1)]
	for i in range(N):
		Prev = Ans[-1]
		if Prev[List[i]] == 'a':
			X = 'b'
		else:
			X = 'a'
		Ans.append(Prev[:List[i]] + X + Prev[List[i] + 1:])
	for i in range(N + 1):
		print(Ans[i])


from sys import stdin
input = stdin.buffer.readline
for _ in range(int(input())):
	n = int(input())
	(*a,) = map(int, input().split())
	s = 'a' * 51
	print(s)
	for i in a:
		s = s[:i] + chr((ord(s[i]) - 97 + 1) % 26 + 97) * (51 - i)
		print(s)


T = int(input())
for _ in range(T):
	N = int(input())
	arr = list(map(int, input().split()[:N]))
	cols = max(arr) + 1
	str = []
	for i in range(cols):
		str.append('a')
	for ch in str:
		print(ch, end='')
	print('')
	for i in range(N):
		str2 = str
		if str[arr[i]] == 'z':
			str2[arr[i]] = 'y'
		else:
			str2[arr[i]] = 'z'
		str = str2
		for ch in str:
			print(ch, end='')
		print('')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	l = max(a)
	l = max(1, l)
	ans = ['a' * l]
	for i in range(n):
		now = ''
		for j in range(l):
			if j < a[i]:
				now += ans[-1][j]
			else:
				lol = ord(ans[-1][j]) + 1
				if lol > 122:
					lol = 97
				now += chr(lol)
		ans.append(now)
	for i in ans:
		print(i)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	strings = ['a' * 55] * (n + 1)
	for (i, x) in enumerate(a):
		change = 'a' if strings[i][x] == 'b' else 'b'
		strings[i + 1] = strings[i][:x] + change + strings[i][x + 1:]
	for string in strings:
		print(string)


import math
t = int(input())
for i in range(t):
	n = int(input())
	pre = list(map(int, input().split()))
	maxv = max(pre)
	ans = ['a' * (maxv + 1) for i in range(n + 1)]
	for (i, e) in enumerate(pre):
		flip = 'a' if ans[i][e] == 'b' else 'b'
		ans[i + 1] = ans[i][:e] + flip + ans[i + 1][e + 1:]
	for i in ans:
		print(i)


def diff(s):
	if s == 'z':
		return 'a'
	return 'z'
for test in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	curr = 'a' * 55
	print(curr)
	for i in l:
		new = curr[:i] + diff(curr[i]) + 'a' * (54 - i)
		print(new)
		curr = new


val = 97
for _ in range(int(input())):
	n = int(input())
	s = [chr(val)] * 60
	l = list(map(int, input().split()))
	print(''.join(s))
	for i in l:
		if s[i] == chr(val + 1):
			s[i] = chr(val)
		else:
			s[i] = chr(val + 1)
		print(''.join(s))
	if val >= 120:
		val = 97


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	maxi = 50
	s = 'a' * maxi
	c = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
	print(s)
	q = 0
	for i in range(n):
		q += 1
		p = s[0:l[i]]
		p += str((maxi - l[i]) * c[q])
		print(p)
		s = p
		if q == 25:
			q = 0


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	st = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
	print(st)
	l2 = []
	for ele in st:
		l2.append(ele)
	for e in l:
		tt = ord(l2[e]) + 1
		if tt > 122:
			tt -= 26
		l2[e] = chr(tt)
		for ele in l2:
			print(ele, end='')
		print()


for _ in range(int(input())):
	n = int(input())
	l = [int(x) for x in input().split()]
	s = 'a' * (max(l) + 1)
	t = [s]
	for j in l:
		k = ''
		for i in s[j:]:
			if i == 'a':
				k += 'b'
			else:
				k += 'a'
		s = s[:j] + k
		t.append(s)
	for i in t:
		print(i)


import sys
inpy = [int(x) for x in sys.stdin.read().split()]
t = inpy[0]
index = 1
for _ in range(t):
	n = inpy[index]
	a = inpy[index + 1:index + 1 + n]
	index += 1 + n
	pre = 'a' * 50
	print(pre)
	for i in range(n):
		s = pre[:a[i]]
		if a[i] < 50:
			s = s + chr((ord(pre[a[i]]) - ord('a') + 1) % 26 + ord('a'))
		r = 50 - len(s)
		s = s + 'a' * r
		pre = s
		print(s)


from sys import stdin, stdout
import math
t = int(stdin.readline())
for _ in range(t):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	ans = ['a']
	c = 0
	for i in range(n):
		if a[i] == 0:
			c += 1
			c %= 26
			ans.append(chr(ord('a') + c))
		elif len(ans[i]) < a[i]:
			c += 1
			c %= 26
			ans[i] += (a[i] - len(ans[i])) * chr(ord('a') + c)
			ans.append(ans[-1])
		else:
			ans.append(ans[-1][:a[i]])
	for s in ans:
		print(s)


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	s = 'a' * 200
	ans = [s]
	for y in a:
		z = chr(ord(s[y]) + 1)
		if s[y] == 'z':
			ins = 'a'
		else:
			ins = z
		curr = s[:y] + ins + s[y + 1:]
		ans.append(curr)
		s = curr
	for x in ans:
		print(x)


from string import ascii_lowercase as s
T = int(input())
for t in range(T):
	n = int(input())
	arr = list(map(int, input().split()))
	ans = ['a' * 200]
	for i in range(len(arr)):
		a = arr[i]
		tmp = ans[i]
		new_s = ans[i][:a] + s[(ord(tmp[a]) - 97 + 1) % 26] * (200 - a)
		ans.append(new_s)
	for a in ans:
		print(a)


for _ in range(int(input())):
	n = int(input())
	ar = list(map(int, input().split()))
	d = []
	li = []
	s = 'a' * (max(ar) + 1)
	li.append(s)
	likapos = 0
	k = ''
	for i in range(len(ar)):
		c = li[likapos]
		for j in range(len(c)):
			if j < ar[i]:
				k += c[j]
			else:
				break
		for j in range(j, len(c)):
			if c[j] == 'a':
				k += 'b'
			else:
				k += 'a'
		li.append(k)
		k = ''
		likapos += 1
	for i in range(len(li)):
		print(li[i])


list1 = [chr(i) for i in range(97, 123)]

def gen(k):
	l = len(k) + 1
	a = [['a' for i in range(200)] for i in range(l)]
	for i in range(l - 1):
		a[i + 1][:k[i]] = a[i][:k[i]]
		if k[i] < 200:
			a[i + 1][k[i]] = 'a' if a[i][k[i]] != 'a' else 'b'
	return a
test_number = int(input())
for _ in range(test_number):
	l = input()
	k = list(map(int, input().split()))
	for word in gen(k):
		for cha in word:
			print(cha, end='')
		print('')


import os, io
from sys import stdout
import collections
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def primes(n):
	sieve = [True] * n
	for i in range(3, int(n ** 0.5) + 1, 2):
		if sieve[i]:
			sieve[i * i::2 * i] = [False] * ((n - i * i - 1) // (2 * i) + 1)
	return [2] + [i for i in range(3, n, 2) if sieve[i]]

def binomial_coefficient(n, k):
	if 0 <= k <= n:
		ntok = 1
		ktok = 1
		for t in range(1, min(k, n - k) + 1):
			ntok *= n
			ktok *= t
			n -= 1
		return ntok // ktok
	else:
		return 0

def powerOfK(k, max):
	if k == 1:
		return [1]
	if k == -1:
		return [-1, 1]
	result = []
	n = 1
	while n <= max:
		result.append(n)
		n *= k
	return result

def divisors(n):
	i = 1
	result = []
	while i * i <= n:
		if n % i == 0:
			if n / i == i:
				result.append(i)
			else:
				result.append(i)
				result.append(n / i)
		i += 1
	return result

def distance(xa, ya, xb, yb):
	return ((ya - yb) ** 2 + (xa - xb) ** 2) ** 0.5

def digitsSum(n):
	if n == 0:
		return 0
	r = 0
	while n > 0:
		r += n % 10
		n //= 10
	return r

def isValid(i, j, n, m):
	return i >= 0 and i < n and (j >= 0) and (j < m)

def print_grid(grid):
	for line in grid:
		print(' '.join(map(str, line)))

def kadane(a, size):
	max_so_far = 0
	max_ending_here = 0
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < max_ending_here:
			max_so_far = max_ending_here
		if max_ending_here < 0:
			max_ending_here = 0
	return max_so_far

def prefixSum(arr):
	for i in range(1, len(arr)):
		arr[i] = arr[i] + arr[i - 1]
	return arr

def ceil(n, d):
	if n % d == 0:
		return n // d
	else:
		return n // d + 1

def _abs(a, b):
	return int(abs(a - b))

def evenodd(l):
	even = [e for e in l if e & 1 == 0]
	odd = [e for e in l if e & 1]
	return (even, odd)
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	m = max(1, max(l))
	result = []
	s = ['a'] * m
	result.append(s)
	alphabet = 'abcdefghijklmnopqrstuvwxyz'
	index = 0
	for i in l:
		nw = result[index][:i]
		if i < m:
			nl = result[index][i]
			nx = alphabet[(alphabet.index(nl) + 1) % len(alphabet)]
			nw += [nx] * (m - i)
		result.append(nw)
		index += 1
	for e in result:
		print(''.join(e))


t = int(input())
for _ in range(t):
	n = int(input())
	A = list(map(int, input().split()))
	S = []
	S.append('a' * (A[0] + 1))
	for i in range(1, n + 1):
		prev = S[i - 1]
		s = prev[:A[i - 1]]
		orda = ord(prev[A[i - 1]])
		ordc = (orda - ord('a') + 1) % (ord('z') - ord('a') + 1) + ord('a')
		c = chr(ordc)
		if i < n:
			if len(s) < A[i] + 1:
				s = s + c * (A[i] + 1 - len(s))
		elif len(s) == 0:
			s = s + c
		S.append(s)
	for s in S:
		print(s)


from math import ceil, log, floor, sqrt
import math
k = 1

def mod_expo(n, p, m):
	result = 1
	while p != 0:
		if p % 2 == 1:
			result = result * n % m
		p //= 2
		n = n * n % m
	return result

def min_subs(n, binary):
	(a, b) = (1, 1)
	mx = 0
	prev = not int(binary[0])
	res = [0] * n
	for i in range(n):
		if int(binary[i]) == 1:
			if int(binary[i]) == prev:
				a += 1
				b = a
			res[i] = a
		else:
			if int(binary[i]) == prev:
				b += 1
				a = b
			res[i] = b
		prev = int(binary[i])
		mx = max(mx, max(a, b))
	print(mx)
	print(*res, sep=' ')

def steps(n):
	return n // 2 + 1

def find_order(n):
	if n % 2 == 0:
		print(*[x for x in range(n, 0, -1)], sep=' ')
	else:
		print(-1)

def max_find(n, k, z, a):
	res = 0
	s = 0
	mx = 0
	for t in range(z + 1):
		pos = k - 2 * t
		if pos < 0:
			continue
		mx = 0
		s = 0
		for i in range(pos + 1):
			if i < n - 1:
				mx = max(mx, a[i] + a[i + 1])
			s += a[i]
		res = max(res, s + mx * t)
	return res
t = 1
t = int(input())
while t:
	t = t - 1
	n = int(input())
	arr = list(map(int, input().split()))
	mx = max(arr)
	res = ['a' * (mx + 1)] * (n + 1)
	for (i, x) in enumerate(arr):
		who = 'a' if res[i][x] == 'b' else 'b'
		res[i + 1] = res[i][:x] + who + res[i][x + 1:]
	print('\n'.join(res))


for t in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	m = max(arr)
	m += 2
	words = []
	w = 'a' * arr[0] + 'b' * (m - arr[0])
	words.append(w)
	c = 'c'
	for i in range(1, n + 1):
		w = words[i - 1][:arr[i - 1]] + c * (m - arr[i - 1])
		words.append(w)
		c = chr(ord(c) + 1)
		if ord(c) > 120:
			c = 'a'
	for j in range(len(words)):
		print(words[j])


testcases = int(input())
for i in range(testcases):
	n = int(input())
	arr = list(map(int, input().split()))
	not_same = ['z', 'y', 'x', 'w', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v']
	pointer = 0
	max_len = max(arr)
	if max_len == 0:
		max_len = 5
	if arr[0] == 0:
		first = not_same[pointer] * max_len
		pointer += 1
		second = not_same[pointer] * max_len
		pointer += 1
	else:
		first = 'a' * arr[0]
		second = first + not_same[pointer] * (max_len - len(first))
		pointer += 1
	print(first)
	print(second)
	current_element = second
	for j in range(1, n):
		if pointer == 25:
			pointer = 0
		current_element = current_element[:arr[j]] + not_same[pointer] * (max_len - len(current_element[:arr[j]]))
		pointer += 1
		print(current_element)


t = int(input())
for i in range(t):
	n = int(input())
	arr1 = list(map(int, input().split()))
	s = max(arr1)
	w = []
	u = 0
	if s == 0:
		for i in range(n + 1):
			apk = chr(ord('b') + u)
			w.append(apk * 4)
			u += 1
		print(*w, sep='\n')
	else:
		init = 'a' * s
		g = 0
		z = 1
		l = 1
		d = [init]
		for i in range(len(arr1)):
			b = arr1[i]
			if b == 0:
				x = chr(ord('a') + z)
				if ord(x) > 122:
					z = 0
					x = chr(ord('a') + z)
					k = x * s
					d.append(k)
					init = k
					z += 1
				else:
					k = x * s
					d.append(k)
					init = k
					z += 1
			else:
				init1 = init[0:b]
				f = s - len(init1)
				c = chr(ord(init[-1]) + 1)
				if ord(c) > 122:
					c = chr(ord('a') + 1)
					l += 1
				init1 = init1 + c * f
				d.append(init1)
				init = init1
		print(*d, sep='\n')


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	flag = False
	prev = ['a'] * 51
	print(''.join(prev))
	for i in range(n):
		if prev[a[i]] == 'a':
			prev[a[i]] = 'b'
		else:
			prev[a[i]] = 'a'
		print(''.join(prev))


for _ in range(int(input())):
	n = int(input())
	prefix_arr = [int(_) for _ in input().split()]
	max_o = max(prefix_arr)
	if max_o == 0:
		max_o = 1
	pre = 'a' * max_o
	print(pre)
	prev = 'b'
	for i in prefix_arr:
		if pre[0:i] != '':
			if pre[:i + 1][-1] == 'a':
				prev = 'b'
			else:
				prev = 'a'
		elif pre[0] == 'a':
			prev = 'b'
		else:
			prev = 'a'
		rem = max_o - i
		pre = pre[0:i] + prev * rem
		print(pre)


import sys
input = sys.stdin.readline

def getInt():
	return int(input())

def getVars():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def getStr():
	return input().strip()

def foo(ch):
	if ch == 'a':
		return 'b'
	else:
		return 'a'
p = 200
t = getInt()
for _ in range(t):
	n = getInt()
	a = getList()
	s = 'a' * p
	print(s)
	for i in range(0, n):
		if a[i] == 0:
			s = foo(s[0]) * p
		else:
			s = s[:a[i]] + foo(s[a[i]]) * (p - a[i])
		print(s)


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u', 'y']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def ceil(x, y):
	if x % y == 0:
		return x // y
	else:
		return x // y + 1

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def main():
	for _ in range(ii()):
		n = ii()
		a = li()
		ans = []
		ans.append('a' * 52)
		pos = 1
		for i in range(n):
			s = ''
			for j in range(a[i]):
				s += ans[-1][j]
			pos = abd[ans[-1][a[i]]] + 1
			pos %= 26
			for j in range(a[i] + 1, 52):
				s += abc[pos]
			ans.append(s)
		for i in ans:
			print(i)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


from itertools import permutations
t = int(input())
test = 'abcdef'
permList = permutations(test)
finalPerm = []
for perm in list(permList):
	finalPerm.append(''.join(perm))
for q in range(0, t):
	n = int(input())
	a = [int(i) for i in input().split()]
	ans = []
	s1 = ''
	s2 = ''
	m = 'a'
	k = 0
	if a[0] != 0:
		for i in range(0, a[0]):
			s1 += 'a'
			s2 += 'a'
	else:
		s1 = 'a'
		s2 = 'b'
		k = 2
	ans.append(s1)
	ans.append(s2)
	for i in range(1, len(a)):
		s1 = ans[len(ans) - 1]
		s2 = ''
		ans.pop(len(ans) - 1)
		if a[i] == 0:
			if s1[0] == 'a':
				s2 = 'b'
			else:
				s2 = 'a'
			k += 1
		elif len(s1) < a[i]:
			s2 = s1
			if m == 'z':
				m = 'a'
			else:
				m = chr(ord(m) + 1)
			for j in range(0, a[i] - len(s2)):
				s1 += m
				s2 += m
		else:
			s2 = s1[0:a[i]]
		ans.append(s1)
		ans.append(s2)
	for i in range(0, len(ans)):
		print(ans[i])


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	ans = ['a' * 60]
	for i in range(n):
		ans.append(ans[i][:a[i]] + (int(ans[i][a[i]] == 'a') * 'b' + int(ans[i][a[i]] == 'b') * 'a') * (60 - a[i]))
	for i in range(len(ans)):
		print(ans[i])


import os
import heapq
import sys
import math
import operator
from collections import defaultdict
from io import BytesIO, IOBase

def inpt():
	return [int(k) for k in input().split()]

def main():
	for _ in range(int(input())):
		n = int(input())
		ar = inpt()
		s = ['a'] * 60
		print(''.join(s))
		for i in ar:
			if s[i] != 'z':
				s[i] = chr(ord(s[i]) + 1)
			else:
				s[i] = chr(ord(s[i]) - 1)
			print(''.join(s))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


import random
T = int(input())
for _ in range(T):
	N = int(input())
	arr = [int(i) for i in input().split()]
	res = []
	st = 'abcdefghijklmnopqrstuvwxyz'
	temp = ''
	if arr[0] == 0:
		temp = 'abcd'
	else:
		for i in range(arr[0]):
			temp += st[i % 26]
	res.append(temp)
	temp = ''
	for i in range(N):
		temp += res[i][0:arr[i]]
		if i < N - 1:
			count = arr[i + 1] - arr[i]
			if count > 0:
				num = (st.index(res[i][-1]) + 1) % 26
				while count > 0:
					temp += st[num]
					count -= 1
			elif arr[i + 1] == 0:
				num = (st.index(res[i][-1]) + 1) % 26
				for _ in range(5):
					temp += st[num]
		res.append(temp)
		temp = ''
	if res[-1] == '':
		num = (st.index(res[-2][0]) + 1) % 26
		for _ in range(5):
			res[-1] += st[num]
	for string in res:
		print(string)


alpha = 'abcdefghijklmnopqrstuvwxyz'
t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().strip().split()]
	s = []
	k = 0
	c = 1
	for i in range(-1, n):
		if i == -1:
			s.append(alpha[k] * arr[0])
		else:
			if i > 0 and arr[i] > arr[i - 1]:
				k += 1
				k = k % 26
				s[-1] += alpha[k] * (arr[i] - arr[i - 1])
			s.append(s[-1][:arr[i]])
		if s[i + 1] == '':
			s[i + 1] = alpha[-c]
			c = c % 26 + 1
	print('\n'.join(s))


import sys
input = sys.stdin.readline

def common(arr):
	l = 51
	start = 97
	string = ''
	for i in range(l):
		string += 'a'
	print(string)
	previous = string
	for i in range(0, len(arr)):
		string = list(string)
		if ord(previous[arr[i]]) + 1 > 122:
			string[arr[i]] = 'a'
		else:
			string[arr[i]] = chr(ord(previous[arr[i]]) + 1)
		string = ''.join(string)
		previous = string
		print(string)

def solution():
	n = int(input())
	arr = list(map(lambda x: int(x), input().split()))
	common(arr)
t = int(input())
for i in range(0, t):
	solution()


import sys
readline = sys.stdin.readline

def solve():
	N = int(readline())
	A = list(map(int, readline().split()))
	s = 'a' * A[0] + 'b'
	print(s)
	for (i, a) in enumerate(A):
		prefix = s[:a]
		filler = 'x' if s[a] != 'x' else 'y'
		if i == len(A) - 1:
			s = prefix + filler
		else:
			s = prefix + filler * (A[i + 1] - len(prefix) + 1)
		print(s)
T = int(readline())
for t in range(T):
	solve()


import os
import heapq
import sys
import math
import bisect
import operator
from collections import defaultdict
from io import BytesIO, IOBase

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def power(x, p, m):
	res = 1
	while p:
		if p & 1:
			res = res * x % m
		x = x * x % m
		p >>= 1
	return res

def inar():
	return [int(k) for k in input().split()]

def lcm(num1, num2):
	return num1 * num2 // gcd(num1, num2)

def main():
	for _ in range(int(input())):
		n = int(input())
		arr = inar()
		res = 'abcdefghijklmnopqrstuvwx'
		c = 0
		st = ['a' * arr[0], 'a' * arr[0]]
		for i in range(1, n):
			if arr[i] > arr[i - 1]:
				rem = arr[i] - len(st[i])
				c = (c + 1) % 24
				st[i] += res[c] * rem
				st.append(st[i])
			else:
				temp = st[i][0:arr[i]]
				st.append(temp)
		take = 'yz'
		c = 0
		for i in range(len(st)):
			if len(st[i]) == 0:
				c = (c + 1) % 2
				print(take[c] * 1)
				continue
			print(st[i])
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
alpha = 'abcde'
for q in range(t):
	n = int(input())
	a = [int(i) for i in input().split()]
	minSize = max(max(a), 4)
	ans = []
	sprev = ''
	for i in range(minSize):
		sprev += alpha[i % 5]
	s = ''
	ans.append(sprev)
	for i in range(n):
		j = 0
		while j < a[i]:
			s += sprev[j]
			j += 1
		if j == minSize:
			ans.append(s)
			s = ''
			continue
		else:
			for k in range(5):
				if sprev[j] != alpha[k]:
					s += alpha[k]
					break
			for k in range(minSize - j - 1):
				s += alpha[k % 5]
		ans.append(s)
		sprev = s
		s = ''
	for i in range(n + 1):
		print(ans[i])


import random
r = 'abcdefghijklmnopqrstuvwxzy'
t = int(input())
for _ in range(t):
	n = int(input())
	a = [int(i) for i in input().split(' ')]
	m = 0
	for i in a:
		m = max(m, i)
	s = []
	for i in range(n + 1):
		s.append([])
		for j in range(m + 1):
			s[-1].append('z')
	for i in range(n):
		for j in range(a[i]):
			s[i + 1][j] = s[i][j]
		while True:
			p = int(random.random() * 26)
			s[i + 1][a[i]] = r[p]
			if s[i + 1][a[i]] != s[i][a[i]]:
				break
	for i in s:
		print(''.join(i))


from sys import stdin
for _ in range(int(input())):
	n = int(stdin.readline().rstrip())
	l = list(map(int, stdin.readline().rstrip().split(' ')))
	r = max(l)
	z = ['a'] * 55
	s = ''.join(z)
	print(s)
	for i in range(n):
		z = list(s)
		extra = ord(z[l[i]])
		if extra >= 122:
			extra = extra + 1 - 26
		else:
			extra += 1
		s = ''.join(z[:l[i]]) + chr(extra) + ''.join(z[l[i] + 1:])
		print(s)


from collections import defaultdict as dc
from collections import Counter
from heapq import *
import math
from bisect import bisect_left, bisect
import sys
from collections import deque as dq
from heapq import heapify, heappush, heappop
mod = 10 ** 9 + 7
import random

def sinp():
	p = str(sys.stdin.readline())
	return p

def seive(n):
	p = [0] * (n + 1)
	for i in range(2, n):
		if p[i] == 0:
			for j in range(2 * i, n + 1, i):
				p[i] = 1
	return p

def lower_bound(a, i, n):
	return bisect_left(a, i)

def upper_bound(a, i, n):
	return n - bisect_left(a, i)

def inp():
	p = int(sys.stdin.readline())
	return p

def line():
	p = list(map(int, sys.stdin.readline().split()))
	return p

def read_mat():
	n = inp()
	a = []
	for i in range(n):
		a.append(line())
	return a

def ind(a):
	return ord(a) - ord('A')

def digit(n):
	s = str(n)
	p = 0
	for i in s:
		p += int(i) ** 2
	return p

def check(s, k):
	for i in range(7):
		if s[i] != '?' and s[i] != k[i]:
			return 0
	return 1
q = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'

def solve(n, a):
	ans = []
	s = q[:a[0]]
	z = a[0] % 50
	if a[0] == 0:
		s = q[z]
		z += 1
	ans.append(s)
	for i in range(n):
		if a[i] == 0:
			ans.append(q[z])
			z = (z + 1) % 50
		elif len(ans[-1]) >= a[i]:
			p = ans[-1][:a[i]]
			ans.append(p)
		else:
			p = ans[-1] + q[z:z + (a[i] - len(ans[-1]))]
			z = (z + (a[i] - len(ans[-1]) + 1)) % 50
			ans[-1] = p
			ans.append(p)
	return ans
t = inp()
for _ in range(t):
	n = inp()
	a = line()
	ans = solve(n, a)
	for z in ans:
		print(z)