#include <fstream>
#include <string>

using namespace std;
ifstream fi("bai2_13.inp");
ofstream fo("bai2_13.out");

int main()
{
    ios::sync_with_stdio(false);
    int b[100],c[100],t,mx=-2e9;
    fi >> t;
    basic_string <char> a[45];
    a[0] = "a"; a[1] = "b";
    for (int i = 0; i < t; i++)
    {
        fi >> b[i] >> c[i];
        mx = max(mx,b[i]);
    }
    int d = 1;
    while (d <= mx)
    {
        ++d;
        a[d] = a[d-2] + a[d-1];
    }
    string s;
    for (int i = 0; i < t; i++)
    {
        fo << a[b[i]][c[i]-1] << endl;
    }
}
