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