#include <bits/stdc++.h>
using namespace std;
const int N = 2000 + 9;
char a[N];
int v[N], sum[N];
int main() {
  int i, j, r, n, t, m, k, ans = 0;
  cin >> t;
  a[0] = 'a';
  while (t--) {
    memset(v, 0, sizeof v);
    memset(a, 0, sizeof a);
    cin >> n >> m >> k;
    int cnt = k, num = k;
    for (i = 1; i <= k; i++) {
      a[i] = 'a' + i - 1;
      v[i - 1]++;
    }
    for (i = k; i <= m - 1; i++) {
      a[i + 1] = a[i];
      v[a[i] - 'a']++;
    }
    for (i = m + 1, j = 1; i <= n; i++, j++) {
      int f = a[j] - 'a';
      v[f]--;
      if (v[f] == 0) {
        a[i] = a[j];
        v[f]++;
      } else
        for (r = 0; r < 24; r++) {
          if (v[r] != 0) {
            a[i] = r + 'a';
            break;
          }
        }
    }
    for (i = 1; i <= n; i++) cout << a[i];
    cout << endl;
  }
}
