#include <bits/stdc++.h>
int n, a, b, t;
int main() {
  std::cin >> t;
  while (t > 0) {
    std::cin >> n >> a >> b;
    std::string s;
    while (s.size() < n) {
      for (int i = 0; i <= a - b; ++i) {
        if (s.size() == n) break;
        s += 'a';
      }
      for (int i = 0; i < b - 1; ++i) {
        if (s.size() == n) break;
        s += (char)(i + 98);
      }
    }
    std::cout << s << std::endl;
    --t;
  }
}
