#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, a, b;
  cin >> n >> a >> b;
  string ans = "";
  long long add = 0;
  while (add != n) {
    for (long long i = 0; i < b and add < n; i++) ans += (char)('a' + i), add++;
    for (long long i = 0; i < a - b and add < n; i++) ans += "a", add++;
  }
  cout << ans << endl;
}
int32_t main() {
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
