#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, a, b;
    cin >> n >> a >> b;
    string s, ans;
    for (long long i = 0; i < b; i++) {
      long long m = 'a';
      char c = m + i;
      s += c;
    }
    for (long long i = 0; i < (n / b); i++) {
      ans += s;
    }
    long long m = ans.length();
    for (long long i = 0; i < n - m; i++) {
      ans += s[i];
    }
    cout << ans << endl;
  }
}
