#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
char pp[] = "abcdefghijklmnopqrstuvwxyz";
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, a, b;
    scanf("%d%d%d", &n, &a, &b);
    char s[2100];
    memset(s, 0, sizeof(s));
    for (int i = a; i < 2100; i += a) {
      for (int j = b; j > 0; j--) {
        s[i - j] = pp[j - 1];
      }
    }
    for (int i = 0; i < n; i++) {
      if (s[i] == 0) {
        printf("a");
      } else {
        printf("%c", s[i]);
      }
    }
    printf("\n");
  }
  return 0;
}
