#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[2000];
  int T, n, a, b, i;
  cin >> T;
  while (T--) {
    cin >> n >> a >> b;
    for (i = 0; i < n; i++) s[i] = 'a' + i % b;
    s[n] = '\0';
    cout << s << endl;
    ;
  }
  return 0;
}
