fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int t;
  7. string z="abcdefghijklmnopqrstuvwxyz";
  8. cin>>t;
  9. while(t--)
  10. {
  11. int n=0;
  12.  
  13. cin>>n;
  14. string s="";
  15. int i=0;
  16. while(n--)
  17. {
  18. s+=z[i];if(i==25)
  19. {
  20. i=0;
  21. }i++;
  22. }cout<<s<<'\n';
  23. }
  24. return 0;
  25. }
Success #stdin #stdout 0s 5456KB
stdin
3
2
2
4
stdout
ab
ab
abcd