#include<iostream>
using namespace std;
int main()
{
	int t,a,b;
	cin>>t;
	while(t--)
	{   char n='b';
		cin>>a>>b;
		for(int i=1;i<=b;i++)
		cout<<"a";
		for(int i=1;i<=a-b;i++)
		{
			if(n==99){cout<<n;n='a';}
			else cout<<n++;
		}
		cout<<endl;
	}
	return 0;
}        
