#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, n, m, x, a, b;
  cin >> t;
  while (t--) {
    cin >> n >> a >> b;
    string s;
    for (x = 0; x < b; x++) s += ('a' + x);
    for (; x < n; x++) s += s[x - b];
    cout << s << "\n";
  }
}
