
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx,avx2,fma")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define __ ios_base::sync_with_stdio(false); cin.tie(0);cout.tie(0);
#define ll long long
#define ul unsigned long long int
#define set0(x) memset(x,0,sizeof(x))
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define rep(i, a, n) for(int i = a; i < (n); ++i)
using namespace std;
int main()
{
int t ;
cin>>t;
while(t--) {
        string ch="";
        int n,k;
    cin>>n>>k;
    int aux=k;
    while(k--)
    {
        ch=ch+'a';

    }

    n=n-aux;

    while(n>0)
    {
        ch=ch+'b';
        n--;

        if (n>0)
        {
            ch=ch+'c';
            n--;
        }
        if (n>0)
            ch=ch+'a';
            n--;
    }


cout<<ch<<endl;



}


}
