#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  long long n, a, b;
  while (t-- > 0) {
    long long count = 0;
    char ar[26];
    for (long long i = 0; i < 26; ++i) {
      ar[i] = 'a' + i;
    }
    cin >> n >> a >> b;
    for (long long j = 0; j < n; ++j) {
      cout << ar[count % b];
      count++;
    }
    cout << endl;
  }
}
