#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, n, x, y, i, j, m;
  m = 0;
  string s = "";
  string k = "abcdefghijklmnopqrstuvwxy";
  cin >> a;
  for (i = 0; i < a; ++i) {
    s = "";
    cin >> n >> x >> y;
    for (j = 0; j < n; ++j) {
      if (j % x < y - 1) {
        s += k[m % 25];
        m += 1;
      } else {
        s += "z";
      }
    }
    cout << s << endl;
  }
}
