#include <bits/stdc++.h>
using namespace std;
string s = "abcdefghijklmnopqrstuvwxyz";
void solve() {
  int n, a, b;
  cin >> n >> a >> b;
  string ans = s.substr(0, b);
  for (int i = b + 1; i <= a; i++) ans += "a";
  string a1 = ans;
  int len = ans.length();
  while (len <= n) {
    ans += a1;
    len += a1.length();
  }
  cout << ans.substr(0, n) << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
}
