#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long testcases = 1;
  cin >> testcases;
  string s = "";
  while (testcases--) {
    long long n, a, b;
    cin >> n >> a >> b;
    s = "";
    for (char i = 0; i < b; i++) s += i + 97;
    for (long long i = 0; i < n; i++) cout << s[i % b];
    cout << endl;
  }
  return 0;
}
