_,j=t=input() while j:a,b=t;j-=1;s="";c=96;exec"c+=j=b;a-=b*q;s+=chr(c)*b*q;b-=a-a*q;"*a;print s