#include <bits/stdc++.h>
using namespace std;
void write();
template <typename T, typename... Args>
void write(T x, Args... args);
void solve() {
  int n, a, b;
  cin >> n >> a >> b;
  string s = "a";
  int t = 0, dif = 1;
  vector<int> c(128);
  c['a'] = 1;
  for (int i = 1; i < n; ++i) {
    if (i >= a) {
      c[s[i - a]]--;
      if (!c[s[i - a]]) dif--;
    }
    if (dif < b) {
      t = (t + 1) % 26;
      s += char('a' + t);
      dif++;
      c[s.back()]++;
    } else {
      s += char('a' + t);
      c[s.back()]++;
    }
  }
  write(s);
}
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  int t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
template <typename T, typename... Args>
void write(T x, Args... args) {
  cout << x;
  if (sizeof...(args)) {
    cout << ' ';
    write(args...);
  } else
    cout << '\n';
}
