#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, a, b;
  cin >> t;
  while (t--) {
    cin >> n >> a >> b;
    char k;
    int i, p = 0, j;
    if (b == 1) {
      for (i = 0; i < n; i++) cout << "a";
    } else {
      for (j = 0; j < n; j++) {
        for (i = 0; i < b; i++) {
          k = i + 97;
          p++;
          if (p > n) break;
          cout << k;
        }
      }
    }
    cout << endl;
  }
  return 0;
}
