#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  int T;
  cin >> T;
  while (T--) {
    int n, a, b;
    cin >> n >> a >> b;
    string s = "";
    for (int i = 1; i <= a - b + 1; i++) s += 'a';
    int now = 'a';
    for (int i = a - b + 2; i <= a; i++) s += char(++now);
    for (int i = 1; i <= n; i++) cout << s[i % a];
    puts("");
  }
  return 0;
}
