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