//In rememberance to GOD//
//May GOD take care to me,my family and all the creatures//
#include<bits/stdc++.h>
using namespace std;



#define ll long long
#define int ll   
#define mod ((int)1e9+7)
#define pii pair<int,int>
#define vi vector<int>
#define vvi vector<vi>
#define vc vector<char>
#define vpi vector<pii>
#define vpic vector<pair<int,char>>
#define vpid vector<pair<int,double>>
#define INF (ll)1e15
#define all(x)  (x).begin(),(x).end()
#define allr(x) (x).rbegin(),(x).rend()
#define pb push_back
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define eb emplace_back

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}

#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#define time__(d) \
    for ( \
        auto blockTime = make_pair(chrono::high_resolution_clock::now(), true); \
        blockTime.second; \
        debug("%s: %lld ms\n", d, chrono::duration_cast<chrono::milliseconds>(chrono::high_resolution_clock::now() - blockTime.first).count()), blockTime.second = false \
    )

//fill memset iota function
// use 1ll<<number(left shift)

const int N=((int)1e6);



// int primes[N];
// // int spf[N];
// vector<int> pr;

// void sieve(){

//     // iota(spf+2,spf+N,2);

// 	for(ll i=2;i<N;i++){
// 		if(primes[i]==0){
// 		 	pr.eb(i*i);
// 			for(ll j=i*i;j<N;j+=i){
//                 // if(spf[j]==j)
//                 // spf[j]=i;
// 				primes[j]=1;
// 			}
// 		}
// 		primes[i]^=1;
// 	}

// }
// nloglogn




ll gcd(ll a, ll b) {if (b > a) {return gcd(b, a);} if (b == 0) {return a;} return gcd(b, a % b);}
void swap(int &x, int &y) {int temp = x; x = y; y = temp;}
ll mod_add(ll a, ll b, ll m) {a = a % m; b = b % m; return (((a + b) % m) + m) % m;}
ll mod_mul(ll a, ll b, ll m) {a = a % m; b = b % m; return (((a * b) % m) + m) % m;}
ll mod_sub(ll a, ll b, ll m) {a = a % m; b = b % m; return (((a - b) % m) + m) % m;}
ll power(ll x, ll y,ll m) {ll res = 1;while (y > 0){ if (y & 1) res = (res*x)%m;y = y>>1;x = x*x%m;}return res;}
//avoid it in power of 2.
//logn implementation
//divisors in o(sqrt(n)) and no of divisors less than 2*(n^1/2);//128(max divisors for n<=1e5)
//for n>=1e5 no of divisors is less than n^1/3;
// use i&1 instead of i%2
//stoll convert string to integer(long long)
//  if(a>b) { return a/b+fun(b,a%b);} else return b/a+fun(a,b%a); technique of mod and minus similar answer but diffent time complexity.
// if(a>b) { return 1+fun(b,a-b);} else return 1+fun(a,b-a);
// class cmp { public:
//     bool operator()(const pair<int,pii> &p1,const pair<int,pii> &p2) const { if(p1.first!=p2.first) return p1.first>p2.first;else
//         {
//             if(p1.second.first!=p2.second.first)
//             {
//                 return p1.second.first>p2.second.first;
//             }
//             else
//             {
//                 return p1.second.second>p2.second.second;
//             }
            
//         }
        
//     }
 
// };
// instead of priority queue i use set defined with cmp class strictly using '=' sign in comparisons(work as multi set)
//erase function with values won't work
//to modify a set i use cmp class stictly without using '=' sign in comparions,example above!!!!  
//erase function with values will work







/////////////////////////////////////// CODE ////////////////////////////////////////////////


// int dx[] = {1,0,-1,0};
// int dy[] = {0,1,0,-1};





// vi adj[N];
// int visited[N];
// int par[N];
// int d[N];



// int binary_searching(int a,int y)
// {
//     int start=-1;
//     int end=a;

//     while(start+1!=end)
//     {
//         int mid=(start+end)/2;
//         if(mid>(a-y))
//         {
//             end=mid;
//         }
//         else
//         {
//             start=mid;
//         }
//     }

//     return end;

    
    
// }


bool palin(string s)
{
    int n=s.size();
    

    for(int i=0;i<n/2;i++)
    {
        if(s[i]!=s[n-i-1])
        {
            return false;
        }
    }

    return true;
}



void solve()
{
    string s;
    cin>>s;

    bool flag=false;

    for(int i=0;i<s.size();i++)
    {
        if(s[i]!='a')
        {
            flag=true;
            break;
        }
    }

    if(!flag)
    {
        cout<<"NO"<<'\n';
        return;
    }

    //appling to first;
    string temp;
    // temp=s;

    temp='a'+s;
    if(!palin(temp))
    {
        cout<<"YES"<<'\n';
        cout<<temp<<'\n';
        return;
    }

    temp=s+'a';

    if(!palin(temp))
    {
        cout<<"YES"<<'\n';
        cout<<temp<<'\n';
    }

































}








int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int t;
    cin>>t;


    // sieve();


    
    // t=1;

    
    for(int i=1;i<=t;i++)
    {
        solve();
        // time__("solve");
    }
    return 0;
}
### Prompt

Please create a solution in cpp to the following problem:

A palindrome is a string that reads the same backward as forward. For example, the strings "z", "aaa", "aba", and "abccba" are palindromes, but "codeforces" and "ab" are not. You hate palindromes because they give you déjà vu.

There is a string s. You must insert exactly one character 'a' somewhere in s. If it is possible to create a string that is not a palindrome, you should find one example. Otherwise, you should report that it is impossible.

For example, suppose s= "cbabc". By inserting an 'a', you can create "acbabc", "cababc", "cbaabc", "cbabac", or "cbabca". However "cbaabc" is a palindrome, so you must output one of the other options.

Input

The first line contains a single integer t (1≤ t≤ 10^4) — the number of test cases.

The only line of each test case contains a string s consisting of lowercase English letters.

The total length of all strings does not exceed 3⋅ 10^5.

Output

For each test case, if there is no solution, output "NO".

Otherwise, output "YES" followed by your constructed string of length |s|+1 on the next line. If there are multiple solutions, you may print any.

You can print each letter of "YES" and "NO" in any case (upper or lower).

Example

Input


6
cbabc
ab
zza
ba
a
nutforajaroftuna


Output


YES
cbabac
YES
aab
YES
zaza
YES
baa
NO
YES
nutforajarofatuna

Note

The first test case is described in the statement.

In the second test case, we can make either "aab" or "aba". But "aba" is a palindrome, so "aab" is the only correct answer.

In the third test case, "zaza" and "zzaa" are correct answers, but not "azza".

In the fourth test case, "baa" is the only correct answer.

In the fifth test case, we can only make "aa", which is a palindrome. So the answer is "NO".

In the sixth test case, "anutforajaroftuna" is a palindrome, but inserting 'a' elsewhere is valid.

### Response

```cpp
//In rememberance to GOD//
//May GOD take care to me,my family and all the creatures//
#include<bits/stdc++.h>
using namespace std;



#define ll long long
#define int ll   
#define mod ((int)1e9+7)
#define pii pair<int,int>
#define vi vector<int>
#define vvi vector<vi>
#define vc vector<char>
#define vpi vector<pii>
#define vpic vector<pair<int,char>>
#define vpid vector<pair<int,double>>
#define INF (ll)1e15
#define all(x)  (x).begin(),(x).end()
#define allr(x) (x).rbegin(),(x).rend()
#define pb push_back
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define eb emplace_back

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}

#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#define time__(d) \
    for ( \
        auto blockTime = make_pair(chrono::high_resolution_clock::now(), true); \
        blockTime.second; \
        debug("%s: %lld ms\n", d, chrono::duration_cast<chrono::milliseconds>(chrono::high_resolution_clock::now() - blockTime.first).count()), blockTime.second = false \
    )

//fill memset iota function
// use 1ll<<number(left shift)

const int N=((int)1e6);



// int primes[N];
// // int spf[N];
// vector<int> pr;

// void sieve(){

//     // iota(spf+2,spf+N,2);

// 	for(ll i=2;i<N;i++){
// 		if(primes[i]==0){
// 		 	pr.eb(i*i);
// 			for(ll j=i*i;j<N;j+=i){
//                 // if(spf[j]==j)
//                 // spf[j]=i;
// 				primes[j]=1;
// 			}
// 		}
// 		primes[i]^=1;
// 	}

// }
// nloglogn




ll gcd(ll a, ll b) {if (b > a) {return gcd(b, a);} if (b == 0) {return a;} return gcd(b, a % b);}
void swap(int &x, int &y) {int temp = x; x = y; y = temp;}
ll mod_add(ll a, ll b, ll m) {a = a % m; b = b % m; return (((a + b) % m) + m) % m;}
ll mod_mul(ll a, ll b, ll m) {a = a % m; b = b % m; return (((a * b) % m) + m) % m;}
ll mod_sub(ll a, ll b, ll m) {a = a % m; b = b % m; return (((a - b) % m) + m) % m;}
ll power(ll x, ll y,ll m) {ll res = 1;while (y > 0){ if (y & 1) res = (res*x)%m;y = y>>1;x = x*x%m;}return res;}
//avoid it in power of 2.
//logn implementation
//divisors in o(sqrt(n)) and no of divisors less than 2*(n^1/2);//128(max divisors for n<=1e5)
//for n>=1e5 no of divisors is less than n^1/3;
// use i&1 instead of i%2
//stoll convert string to integer(long long)
//  if(a>b) { return a/b+fun(b,a%b);} else return b/a+fun(a,b%a); technique of mod and minus similar answer but diffent time complexity.
// if(a>b) { return 1+fun(b,a-b);} else return 1+fun(a,b-a);
// class cmp { public:
//     bool operator()(const pair<int,pii> &p1,const pair<int,pii> &p2) const { if(p1.first!=p2.first) return p1.first>p2.first;else
//         {
//             if(p1.second.first!=p2.second.first)
//             {
//                 return p1.second.first>p2.second.first;
//             }
//             else
//             {
//                 return p1.second.second>p2.second.second;
//             }
            
//         }
        
//     }
 
// };
// instead of priority queue i use set defined with cmp class strictly using '=' sign in comparisons(work as multi set)
//erase function with values won't work
//to modify a set i use cmp class stictly without using '=' sign in comparions,example above!!!!  
//erase function with values will work







/////////////////////////////////////// CODE ////////////////////////////////////////////////


// int dx[] = {1,0,-1,0};
// int dy[] = {0,1,0,-1};





// vi adj[N];
// int visited[N];
// int par[N];
// int d[N];



// int binary_searching(int a,int y)
// {
//     int start=-1;
//     int end=a;

//     while(start+1!=end)
//     {
//         int mid=(start+end)/2;
//         if(mid>(a-y))
//         {
//             end=mid;
//         }
//         else
//         {
//             start=mid;
//         }
//     }

//     return end;

    
    
// }


bool palin(string s)
{
    int n=s.size();
    

    for(int i=0;i<n/2;i++)
    {
        if(s[i]!=s[n-i-1])
        {
            return false;
        }
    }

    return true;
}



void solve()
{
    string s;
    cin>>s;

    bool flag=false;

    for(int i=0;i<s.size();i++)
    {
        if(s[i]!='a')
        {
            flag=true;
            break;
        }
    }

    if(!flag)
    {
        cout<<"NO"<<'\n';
        return;
    }

    //appling to first;
    string temp;
    // temp=s;

    temp='a'+s;
    if(!palin(temp))
    {
        cout<<"YES"<<'\n';
        cout<<temp<<'\n';
        return;
    }

    temp=s+'a';

    if(!palin(temp))
    {
        cout<<"YES"<<'\n';
        cout<<temp<<'\n';
    }

































}








int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int t;
    cin>>t;


    // sieve();


    
    // t=1;

    
    for(int i=1;i<=t;i++)
    {
        solve();
        // time__("solve");
    }
    return 0;
}
```