#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long int j, n, m, po, a, b, no, flag, cnt = 0, t, cnt2, ar[200001], x, y,
                                             i, co[200001], sum = 0, k,
                                             ans = INT_MIN, sum1 = 0;
  string str[1000], ptr, tr, rtr, rt;
  vector<long long int> v1, v2;
  set<string> s;
  set<long long int> si;
  queue<long long int> qui;
  queue<string> qus;
  set<string>::iterator it;
  cin >> t;
  while (t--) {
    cin >> n >> a >> b;
    string sr;
    for (i = 0; i < a; i++) {
      sr[i] = char('a' + i % b);
    }
    for (i = 0; i < n; i++) {
      cout << sr[i % a];
    }
    cout << endl;
  }
}
