#include <bits/stdc++.h>
using namespace std;
int t, a, b, n, cont;
char c;
int main() {
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> n >> a >> b;
    c = 'a';
    if (a == b) {
      for (int j = 0; j < n; j++) {
        cout << char('a' + (j % 26));
      }
    } else {
      for (int k = 0; k < b; k++) cout << char('a' + (k % b));
      for (int j = b; j < n; j++) cout << char('a' + (j % b));
    }
    cout << endl;
  }
}
