String Generation

TimeLimit:1000MS  MemoryLimit:256MB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description

One fall day Joe got bored because he couldn't find himself something interesting to do. Marty suggested Joe to generate a string of length n to entertain him somehow. It didn't seem particularly difficult, but Joe's generated string had to follow these rules:

  • the string may only contain characters 'a', 'b', or 'c';

  • the maximum length of a substring of this string that is a palindrome does not exceed k.

A string a is a substring of a string b if a can be obtained from b by deletion of several (possibly, zero or all) characters from the beginning and several (possibly, zero or all) characters from the end. For example, strings "a", "bc", "abc" are substrings of a string "abc", while strings "ac", "ba", "cba" are not.

A string is a palindrome if it reads the same from the left to the right and from the right to the left. For example, strings "abccba", "abbba", "aba", "abacaba", "a", and "bacab" are palindromes, while strings "abcbba", "abb", and "ab" are not.

Now Joe wants to find any correct string. Help him! It can be proven that the answer always exists under the given constraints.

Input

Each test contains one or more test cases. The first line contains the number of test cases t (1 ≤ t ≤ 10).

The only line of each test case contains two integers n and k (1 ≤ k ≤ n ≤ 1000) — the required string length and the maximum length of a palindrome substring, respectively.

Output

For each test case, print any string that satisfies the conditions from the problem statement. If there are multiple correct answers, you can print any one of them. It can be proven that the answer always exists under the given constraints.

SampleInput
2
3 2
4 1
SampleOutput
aab
acba
Note

In the first test case of the example, the palindrome substring with the maximum length is "aa". Its length does not exceed 2, so it fits.

In the second test case all palindrome substrings have the length one.

Submit
题目统计信息详细
总AC数8
通过人数8
尝试人数9
总提交量10
AC率80.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: