4)

#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <cmath>
 
using namespace std;
 
int main()
{
    int t;
    string s;
    cin >> t;
    while (t--)
    {
        cin >> s;
        auto polindrom = [](const string& X) {
            int n = X.size();
            for (int j = 0; j < n; j++)
                if (X[j] != X[n - j - 1])
                    return false;
            return true;
            };
 
        if (!polindrom(s+'a') )
            cout << "YES\n" << 'a' << s << endl;
        else if (!polindrom('a'+s) )
            cout << "YES\n" << s << 'a' << endl;
        else
            cout << "NO\n";
    }
}