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.

Solution (in CPP):

Solution:
    #include <bits/stdc++.h>
#include<map>
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define pb(x) emplace_back(x)
#define forn(i,N) for(int i=0;i<N;i++)
#define rep(i,N) for(int i=0;i<=N;i++)

#include<vector>
#include<set>
#define ll long long int
#define S second

using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using ld=long double;
using vi=vector<int>;
using vll=vector<ll>;
using vd=vector<double>;
using vvi=vector<vi>;
int ctoi(char c) {return c-'0';}
int slen(string s) {return s.length();}
int vsize(vi a) {return (int)a.size();}
int in() {int x;cin>>x;return x;}
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define ld long double
// I failed countless times
// I am still failing,
// I don't know how to win but, 
// I know how to not give up ✌

typedef pair<ll,ll> pll;
typedef vector<pll> vpll;
typedef map<ll,ll> mpll;
typedef set<ll> stll;

ll n;
void kmin(ll n, ll m){
    ll val = n / m; 
    n = n - (val*m);
    ll val1 = (m-n)*(val-1)*(val)/2;
    ll val2 = n*val*(val+1)/2;
    ll val3 = val1 + val2;
    cout<<val3<<" ";
}
void kmax(ll n, ll m){
    n = n -(m-1);
    ll val = n*(n-1)/2;
    cout<<val;
    cout<<endl;
}
const int M = 1000000  ;

 
ll prime(ll x){
    for(ll i=2;i*i<=x;i++){
        if(x%i==0)return i;
    }
    return x;
}


vector<pair<ll, ll> > v;
set<ll> s;

bool check(ll x) {
	for (int i = 1; i < n; i++) {
		if (v[i].first % x != 0 && v[i].second % x != 0) {
			return 0;
		}
	}
	return 1;
}
void get_prime(ll x) {
	if (x % 2 == 0)
		s.insert(2);
	while (x % 2 == 0)x = x / 2;
	for (int i = 3; i <= sqrt(x); i += 2) {
		if (x % i == 0) {
			s.insert(i);
			while (x % i == 0)
				x = x / i;
		}
	}
	if (x > 2) {
		s.insert(x);
	}
}


vll ar[1000000];
stll cycle;
vll path;
bool vis[1000000];


 
 


 int isp(int x){
	if(x<2)return 0;
	for(int i=2;i*i<=x;i++)
		if(x%i==0)return 0;
	return 1;
}
void dfs(int n,int m,int x,int y, bool visited[105][105])
{
    if(x>=n || y>=m || x<0 || y<0 || visited[x][y])
    return;
    visited[x][y]=true;
    cout<<x+1<<" "<<y+1<<"\n";
    for(int i=0;i<n;i++)
    dfs(n,m,i,y,visited);
    for(int i=0;i<m;i++)
    dfs(n,m,x,i,visited);
}

ll MAXN=3e5+7;
ll sumofdigits(ll n){
  ll result = 0;
  while(n > 0){
    result += n%10;
    n = n/10;
  }
  return result;
}
ll MOD=1e9+7;
ll memo[1010][1010][2];
ll fly(ll n, ll cur, ll dir,  ll f){
    if(f==1||cur==0||cur==n+1)
    return 0;
    if(memo[cur-1][f-1][dir]!=-1){
        return memo[cur-1][f-1][dir-1];
    }
    ll tans=0;
    if(dir==0){
        tans=(tans+fly(n, cur+1, 0, f))%MOD;
        tans=(1+(tans+fly(n, cur-1, 1, f-1))%MOD)%MOD;
    }
    if(dir==1){
        tans=(1+(tans+fly(n, cur+1, 0, f-1))%MOD)%MOD;
        tans=(tans+fly(n, cur-1, 1, f))%MOD;
    }
    memo[cur-1][f-1][dir]=tans;
    return tans;
}
ll maximum(ll n)
{
    for(int i=2;i<=sqrt(n);i++)
    {
        if(n%i==0)
        return n/i;
    }
    return 1;
}
void solve() {
string s;
   cin>>s;
   ll p=-1;
   ll n=s.size();
   for(int i=0;i<n/2;i++){
       if(s[i]!='a')
       p=n-1-i;
       else if(s[n-i-1]!='a')
       p=i;
   }
   if(p==-1&&n%2&&s[n/2]!='a')
   p=n/2;
   if(p==-1){
       cout<<"NO";
       return;
   }
   cout<<"YES\n";
    for(int i=0;i<n;i++){
       cout<<s[i];
       if(p==i)
       cout<<'a';
   }

}
int main()
{ IOS;
    ll t=1;
   cin>>t;
    
    while(t--){
      
     
      solve();
      cout<<"\n";
     
    }

    return 0;
}