#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, a, b, x, cnt = 0;
    char c = 'a';
    cin >> n >> a >> b;
    for (int i = 1; i <= n; i++) {
      cout << c;
      if (c == 'z') {
        c = 'a';
        c--;
      }
      c++;
      cnt++;
      if (a == b) {
        continue;
      } else {
        if (cnt == b) {
          c = 'a';
          cnt = 0;
        }
      }
    }
    cout << endl;
  }
  return 0;
}
