codeforces1335B
#include<bits/stdc++.h> using namespace std; const int N = 30; char arr[N]; int main(){ int t; cin>>t; while(t--){ int n,a,b; cin>>n>>a>>b; int x=0; for(char i = 'a';i<='z';i++) arr[x++]=i; for(int i=0,j=0,cnt=0;i<n;j++){ if(j==n) break; cout<<arr[i]; if(i<b-1) i++; if(cnt==a-1){ i=0; cnt=0; } else cnt++; } cout<<endl; } return 0; }