#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int n, a, b, flag = 0, count = 0;
    cin >> n >> a >> b;
    char x[27];
    x[0] = 'a';
    for (int i = 0; i < 26; i++) {
      x[i + 1] = x[i] + 1;
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < a; j++) {
        if (j < b)
          cout << x[j];
        else
          cout << 'a';
        count++;
        if (count == n) break;
      }
      if (count == n) break;
    }
    cout << endl;
  }
  return 0;
}
