#include <bits/stdc++.h>
int main() {
  long long int t, n, a, b, i, j;
  char ch;
  scanf("%lli", &t);
  while (t--) {
    scanf("%lli %lli %lli", &n, &a, &b);
    for (i = 1; i <= n;) {
      for (j = 1; j <= b && i <= n; i++, j++) {
        ch = 96 + j;
        printf("%c", ch);
      }
    }
    printf("\n");
  }
  return 0;
}
