#include <bits/stdc++.h>
using namespace std;
const long long logN = 20;
const long long M = 1000000007;
const long long INF = 1e12;
int pow1(int a, int b) {
  int res = 1;
  while (b > 0) {
    if (b & 1) {
      res = res * a;
    }
    a = a * a;
    b >>= 1;
  }
  return res;
}
int main() {
  long long t = 1;
  cin >> t;
  while (t--) {
    long long n, a, b;
    cin >> n >> a >> b;
    string str;
    map<char, long long> mp;
    for (long long i = 0; i < b; i++) {
      str += ('a' + i);
      mp['a' + i]++;
    }
    for (long long i = b; i < n; i++) {
      str += str[i - b];
    }
    cout << str << "\n";
  }
}
