Construct the String

题意翻译

### 题目描述 给你三个正整数 $n,a$ 和 $b$。必须构造一个长度为 $n$ 的字符串 $s$,该字符串由小写英文字母组成,使得字符串 $s$ 中所有长度为 $a$ 的子串正好有 $b$ 个不同的字母。保证答案一定存在。 字符串 $s$ 的字串是指 $s$ 中连续的一段字符,比如 $s_l,s_{l+1},\dots,s_r$ 所构成的字符串就是 $s$ 的一个字串,可以记为 $s[l\dots r]$,这个字串的长度为 $r-l+1$。当然,在本题中,我们只关注长度为 $a$ 的字串。 ### 输入格式 **本题有多组数据。** 第一行一个整数 $t(1\le t\le 2\times 10^3)$,表示数据组数。 接下来 $t$ 行,每行三个整数 $n,a,b(1\le a\le n\le 2\times 10^3,1\le b\le\min(26,a))$,意义如题述。 保证 $\sum n\le 2\times 10^3$。 ### 输出格式 共 $t$ 行,每行一个字符串 $s$,即题中要求构造的字符串。 ### 样例第一组数据说明 字符串 $s$ 中共有 $3$ 个长度为 $5$ 的字串: - `tleel`:共有 $3$ 个不同的字符,符合题意。 - `leelt`:共有 $3$ 个不同的字符,符合题意。 - `eelte`:共有 $3$ 个不同的字符,符合题意。 感谢 @[CSP_Sept](https://www.luogu.com.cn/user/224931) 提供的翻译。

题目描述

You are given three positive integers $ n $ , $ a $ and $ b $ . You have to construct a string $ s $ of length $ n $ consisting of lowercase Latin letters such that each substring of length $ a $ has exactly $ b $ distinct letters. It is guaranteed that the answer exists. You have to answer $ t $ independent test cases. Recall that the substring $ s[l \dots r] $ is the string $ s_l, s_{l+1}, \dots, s_{r} $ and its length is $ r - l + 1 $ . In this problem you are only interested in substrings of length $ a $ .

输入输出格式

输入格式


The first line of the input contains one integer $ t $ ( $ 1 \le t \le 2000 $ ) — the number of test cases. Then $ t $ test cases follow. The only line of a test case contains three space-separated integers $ n $ , $ a $ and $ b $ ( $ 1 \le a \le n \le 2000, 1 \le b \le \min(26, a) $ ), where $ n $ is the length of the required string, $ a $ is the length of a substring and $ b $ is the required number of distinct letters in each substring of length $ a $ . It is guaranteed that the sum of $ n $ over all test cases does not exceed $ 2000 $ ( $ \sum n \le 2000 $ ).

输出格式


For each test case, print the answer — such a string $ s $ of length $ n $ consisting of lowercase Latin letters that each substring of length $ a $ has exactly $ b $ distinct letters. If there are multiple valid answers, print any of them. It is guaranteed that the answer exists.

输入输出样例

输入样例 #1

4
7 5 3
6 1 1
6 6 1
5 2 2

输出样例 #1

tleelte
qwerty
vvvvvv
abcde

说明

In the first test case of the example, consider all the substrings of length $ 5 $ : - "tleel": it contains $ 3 $ distinct (unique) letters, - "leelt": it contains $ 3 $ distinct (unique) letters, - "eelte": it contains $ 3 $ distinct (unique) letters.