#include <bits/stdc++.h>
#define int long long
using namespace std;
/*
OBSERVATIONS:
so root k method gives TLE
maybe some BS or greedy way to find this..
BS can be whether b occurs at this point
or not..
if i think k as a dash ..
so one thing i found is that root 2*k
groups are def there before any k ..
there is +-n diff this is approximation..
so for small values like
*/
int isqrt(int x)
{
int r = sqrtl(x);
while ((r + 1) * (r + 1) <= x)
r++;
while (r * r > x)
r--;
return r;
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while (t--)
{
int k;
cin >> k;
int curr = 0;
bool a_turn = true;
bool is_a = true;
int group_before = isqrt(2 * k);
group_before -= 2;
group_before = max(group_before, 0LL);
int as = group_before + 1;
curr += (group_before) * (group_before + 1) / 2;
if (curr)
curr += group_before;
while (true)
{
if (a_turn)
{
a_turn = false;
curr += as;
as++;
if (curr >= k)
{
break;
}
}
else
{
curr++;
if (curr == k)
{
is_a = false;
break;
}
a_turn = 1;
}
}
if (is_a)
cout << 'a' << endl;
else
cout << 'b' << endl;
}
return 0;
}