#include <bits/stdc++.h>
using namespace std;
vector<long long> vec[(long long)1e6];
vector<long long> comp;
long long vis[(long long)1e6];
void dfs(long long s) {
  vis[s] = 1;
  for (long long i = 0; i < vec[s].size(); i++)
    if (!vis[vec[s][i]]) {
      dfs(vec[s][i]);
    }
}
long long power(long long x, long long y) {
  long long temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return (temp * temp) % ((long long)(1e9 + 7));
  else
    return (x * temp * temp) % (long long)(1e9 + 7);
}
void coding() {
  long long i, j, k, l, m, n, t;
  cin >> t;
  while (t--) {
    long long a, b;
    cin >> n >> a >> b;
    string s = "";
    for (i = 0; i < n; i++) {
      s += ('a' + (i % b));
    }
    cout << s << endl;
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cout << fixed << setprecision(11);
  while (t--) {
    coding();
  }
}
