#include <bits/stdc++.h>
using namespace std;
typedef vector<int> VI;
typedef pair <int,int> ii;
typedef long long LL;
#define pb push_back
const int INF = 2147483647;
const int N = 1000005;
int z, u;
LL x;
bool check(int x, LL y) {
return x * 1LL * (x + 1) == y;
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> z;
while(z--) {
cin >> x;
x = 2 * x + 2;
u = int(sqrt(x));
if (check(u, x) || check(u + 1, x) || check(u - 1, x)) cout << "b\n"; else cout << "a\n";
}
return 0;
}