#include<bits/stdc++.h>
using namespace std;
#define ll long long
#ifndef ONLINE_JUDGE
#define dbg(x) cout << #x << ":- " << x << "\n"
#else
#define dbg(x)
#endif
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(),x.rend()
#define MOD 1000000007
//-----------------------------------------------------------------------------//
void print(vector<ll>arr){for(int i=0;i<arr.size();i++){cout<<arr[i]<<" ";}
cout<<endl;}
void print(map<ll,ll>mpp){for(auto x:mpp){cout<<x.first<<"-->"<<x.second<<"\n";}
cout<<endl;}
void print(set<ll>s){for(auto x:s){cout<<x<<" ";}cout<<endl;}
/* OBSERVATIONS
//------------------------------------------------------------------------------//
let say i have x
then if p is the smallest pf
and q is the largest pf
then,
if k is even
we do
x* p^(k/2)
q^(k/2)
//------------------------------------------------------------------------------//
*/
vector<int>primes;
void sieve_of_eratosthenes(int n) {
vector<bool> is_prime(n + 1, true);
is_prime[0] = is_prime[1] = false; // 0 and 1 are not prime numbers
for (int i = 2; i * i <= n; ++i) {
if (is_prime[i]) {
// Marking all multiples of i as not prime
for (int j = i * i; j <= n; j += i) {
is_prime[j] = false;
}
}
}
for (int i = 2; i <= n; ++i) {
if (is_prime[i]) {
primes.push_back(i);
}
}
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
sieve_of_eratosthenes(1e5);
int t;
cin>>t;
while(t--){
ll n;
cin>>n;
long double tt=2.25+2*n;
long double k=sqrtl(tt);
long double temp=k-1.5;
// dbg(temp);
if(temp>=0&&floor(temp)==temp)cout<<"b\n";
else cout<<"a\n";
}
return 0;
}