#include <iostream>
using namespace std;
int fib[45];
char solve(int n, int k) {
if (n == 0) return 'a';
if (n == 1) return 'b';
if (k <= fib[n - 2]) return solve(n - 2, k);
return solve(n - 1, k - fib[n - 2]);
}
int main() {
int n, k, tests;
fib[0] = 1;
fib[1] = 1;
for (int i = 2; i < 45; i++) fib[i] = fib[i - 1] + fib[i - 2];
cin >> tests;
while (tests--) {
cin >> n >> k;
cout << solve(n, k) << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IGZpYls0NV07CgpjaGFyIHNvbHZlKGludCBuLCBpbnQgaykgewoJaWYgKG4gPT0gMCkgcmV0dXJuICdhJzsKCWlmIChuID09IDEpIHJldHVybiAnYic7CglpZiAoayA8PSBmaWJbbiAtIDJdKSByZXR1cm4gc29sdmUobiAtIDIsIGspOwoJcmV0dXJuIHNvbHZlKG4gLSAxLCBrIC0gZmliW24gLSAyXSk7Cn0KCmludCBtYWluKCkgewoJaW50IG4sIGssIHRlc3RzOwoJZmliWzBdID0gMTsKCWZpYlsxXSA9IDE7Cglmb3IgKGludCBpID0gMjsgaSA8IDQ1OyBpKyspIGZpYltpXSA9IGZpYltpIC0gMV0gKyBmaWJbaSAtIDJdOwoJY2luID4+IHRlc3RzOwoJd2hpbGUgKHRlc3RzLS0pIHsKCQljaW4gPj4gbiA+PiBrOwoJCWNvdXQgPDwgc29sdmUobiwgaykgPDwgZW5kbDsKCX0KCXJldHVybiAwOwp9