#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
const int mod = 1e9 + 7;
void solve() {
  int n, a, b;
  cin >> n >> a >> b;
  string s;
  for (int i = 0; i < a - b; i++) {
    s += "a";
  }
  string ss = "abcdefghijklmnopqrstuvwxyz";
  s += ss.substr(0, b);
  for (int i = 0; i < n / a; i++) {
    cout << s;
  }
  cout << s.substr(0, n % a) << endl;
  ;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
