#include <bits/stdc++.h>
using namespace std;
int t, n, a, b;
int main() {
  cin >> t;
  while (t--) {
    cin >> n >> a >> b;
    for (int i = 0; i < n; i++) {
      char aux = (i % b + 'a');
      cout << aux;
    }
    cout << endl;
  }
  return 0;
}
