Azad is first-year engineering student. one day his teacher caught him playing game on his phone during data structures lecture then teacher gave him a problem and ask him to come tomorrow with solution otherwise he will not allow him to attend the lecture and as Azad’s attendance is already below the required attendance, so he can not afford to miss upcoming lectures.
Azad is not good at programming so he is asking you to help him to solve a problem given below.
By using lower case character from a to z you have to form a string of length N (1 ≤ N≤ 100) using following instructions.
When N is even:
Use N/2 (when N ≤ 26) number of sequence characters or character from starting and ending part of a to z .
For example N= 2 az
N=4 abyz
When N is greater than 26 repeat the instructions again. For example N= 28 abcdefghijklmnopqrstuvwxyzaz
When N is odd:
Use (N-1)/2 (when N ≤ 26) number of sequence characters or character from starting and ending part of a to z and to select the middle character use case 1 and case 2.
Case 1- when sum of digits or digit of N is equal to even Give preference to those characters whose ASCII value is smaller to select the middle character of string.
for example N=11 ( 1+1= 2 is even)
abcdefvwxyz is correct
abcdeuvwxyz is incorrect
Case 2- when sum of digits or digit of N is equal to odd Give preference to those characters whose ASCII value is greater to select the middle character of string.
for example N=21 ( 2+1= 3 is odd)
abcdefghijpqrstuvwxyz is correct
abcdefghijkqrstuvwxyz is incorrect
When N is greater than 26 repeat the instructions again . For example N= 29 abcdefghijklmnopqrstuvwxyzayz
Input
• The first line of the input contains a single integer T denoting the number of test cases.
• The first line of each test case contains N denoting length of the string.
Output
For each test case, output the required string of length N in new line.
Constraints
1 ≤ T ≤ 100
1 ≤ N≤ 100
Example
Input:
6
2
4
11
21
28
29
Output:
az
abyz
abcdefvwxyz
abcdefghijpqrstuvwxyz
abcdefghijklmnopqrstuvwxyzaz
abcdefghijklmnopqrstuvwxyzayz
PrateekTiwari1 | 182 |
blackshadows | 154 |
TusharSharma3 | 151 |
dhananjaykajla | 134 |
udrasht | 124 |
Amit Kushwaha 1 | 551 |
TusharSharma3 | 496 |
mb1973 | 396 |
dhananjaykajla | 360 |
SaurabhPatil3 | 359 |
akhayrutdinov | 4973 |
Ibrahim Nash | 4712 |
Quandray | 4289 |
sanjay05 | 3668 |
GB11 | 2857 |