#include<iostream>
#include<string>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
if (n == 1)
{
cout << "NO" << endl;
continue;
}
string str;
for (n; n > 1; n -= 2)
{
if (n > 3)str += "AAB";
else if (n == 3)break;
else if(n==2) str += "AA";
}
if (n == 3)cout << "NO" << endl;
else
{
if (str.size() > 200)str.erase(200);
cout << "YES"<<endl << str << endl;
}
}
}
A - Special Characters(codeforces)
于 2024-03-16 15:51:56 首次发布