#include <bits/stdc++.h>
using namespace std;
const long long int infinity = 9e18;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  for (int idx = 0; idx < t; idx++) {
    long long int n, a, b;
    cin >> n >> a >> b;
    string s(n, 'a');
    char ch = 'a';
    for (int i = 0; i < b - 1; i++) {
      ch++;
      for (int j = i; j < n; j += a) {
        s[j] = ch;
      }
    }
    cout << s << "\n";
  }
  return 0;
}
