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