#include<bits/stdc++.h>
using namespace std;
int main()
{
	
	string s;
	int n,m,t;
	scanf("%d",&t);
	while(t--)
	{
		char b[5]={'a','b','c'};
		scanf("%d%d",&n,&m);
		for(int i=1;i<=m;++i)
		s+='a';
		int sum=0,k=1;
		for(int i=m+1;i<=n;++i)
		{
			s+=b[k];
			sum++;
			if(sum==m)
			k=(k+1)%3,sum=0;
		}
		cout<<s<<endl;
		s.clear();
	}
	
 } 
