#include <bits/stdc++.h>
using namespace std;
#define int long long int
int32_t main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
#ifdef SUBLIME
freopen("inputf.in", "r", stdin);
freopen("outputf.out", "w", stdout);
freopen("error.txt", "w", stderr);
#endif
int tt;
cin >> tt;
while (tt--) {
int k;
cin >> k;
int lo = 0, hi = INT_MAX, ans = -1;
while (lo <= hi) {
int mid = lo + (hi - lo) / 2;
int cnt = mid * (mid + 3) / 2;
if (cnt < k) {
ans = mid;
lo = mid + 1;
}
else hi = mid - 1;
}
k -= ans * (ans + 3) / 2;
if (k == ans + 2) cout << "b\n";
else cout << "a\n";
}
return 0;
}