#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, a, b;
  cin >> n >> a >> b;
  string ans;
  int i = 0;
  for (; i < b; ++i) ans += (char)(i + 'a');
  --i;
  for (int j = b; j < a; ++j) ans += (char)(i + 'a');
  char prev = ans[0];
  for (int j = 1; (int)ans.size() < n; ++j) {
    ans += prev;
    prev = ans[j];
  }
  cout << ans << '\n';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int test_cases;
  cin >> test_cases;
  while (test_cases--) {
    solve();
  }
  return 0;
}
