Palindromes Not Allowed

 It is JJ's birthday and you decide to gift him a string 

S of length N. But you also know that JJ does not like palindromes so you decide that none of the substrings of S of length 2 should be a palindrome.

Can you find any suitable string which can be gifted to JJ?

Recall that a string is called palindrome if it reads the same backwards and forwards, for e.g. noon and level are palindromic strings.

Input Format

  • The first line contains T - the number of test cases. Then the test cases follow.
  • The first and only line of each test case contains an integer N - the length of the string S to be constructed.

Output Format

For each test case, output a string S of length N such that none of its substrings (of length 2) is a palindrome.

If there are multiple strings which satisfy the condition, print any.

Constraints

  • 1T100
  • 1N1000

Sample Input 1 

3
2
2
4

Sample Output 1 

gl
hf
waow

Explanation

Test case 1: gl is the only substring of length 2 and it is not a palindrome.

Test case 2: hf is the only substring of length 2 and it is not a palindrome.

Test case 3: Following are the substrings of length 2:

  • Length=2waaoow
  • Length=3waoaow
  • Length=4waow

We can see that none of these substrings is a palindrome.

Previous
Next Post »