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>
#define ll long long int
#define pb push_back
#define pf push_front
#define vi vector 
#define ff first
#define ss second
#define MX 1000000007
const int p = 1e6+ 2 ;
const ll inf = 1e18 ;
const ll mod = 1000000007 ;
using namespace std  ;
ll dp[1050][1050] ;
ll ans = 0 ;
ll shu = 1 ;
int subtree[p] ;
int till_prime[p] ;
int spf[p] ;
bool is_prime[p] ;
int r[p] ; // number of distinct primes
int parent[p] ;
ll factorialNumInverse[p + 1];
ll naturalNumInverse[p + 1];
ll fact[p + 1];
bool is_visited[p] = {false} ;
vi <int> primes ;
vi <int> edge[p] ;
int si ;
void dfs(int p , int x) ;
void solve() ;
void prime() ; 
void seive() ;
void intialise(int ) ;
int root( int ) ;
void union_set(int,int) ;
ll power( ll , ll , ll ) ;
ll gcd(ll,ll) ;
ll nCr(ll , ll , ll );
void InverseofNumber(ll mod) ;
void InverseofFactorial(ll mod);
void factorial(ll mod);


void InverseofNumber(ll mod)
{
    naturalNumInverse[0] = naturalNumInverse[1] = 1;
    for (int i = 2; i < p; i++)
        naturalNumInverse[i] = naturalNumInverse[mod % i] * (mod - mod / i) % mod;
}

void InverseofFactorial(ll mod)
{
    factorialNumInverse[0] = factorialNumInverse[1] = 1;
 

    for (int i = 2; i < p; i++)
        factorialNumInverse[i] = (naturalNumInverse[i] * factorialNumInverse[i - 1]) % mod;
}
 

void factorial(ll mod)
{
    fact[0] = 1;
 

    for (int i = 1; i < p; i++) {
        fact[i] = (fact[i - 1] * i) % mod;
    }
}
 

ll nCr(ll N, ll R, ll mod)
{

    ll ans = ((fact[N] * factorialNumInverse[R])
              % mod * factorialNumInverse[N - R])
             % mod;
    return ans;
}
ll gcd(ll a , ll b )
{
    if (b == 0)
        return a;
    return gcd(b, a % b); 
}
 
 

ll power( ll x , ll y , ll p )
{   
    ll res = 1 ;
 
    x %= p ;
 
    while( y )
    {
        if( y & 1 )
        { 
                res = ( ( ( res % p) * ( x % p ) ) % p ) ;
        }
 
        y >>= 1 ;
 
        x =  ( ( ( x % p ) * ( x % p ) ) % p ) ;
    }
 
    return( res % p ) ;
 
}
int root( int x)
{
    while( x != parent[x] )
    {
        parent[x] = parent[parent[x]] ;
        x = parent[x] ;
    }
 
    return x ;
}
void union_set(int p ,int q)
{
    int x = root(p) ;
    int y = root(q) ;
 
    parent[y] = parent[x] ;
}
 
void intialise( int n )
{
    for( int i = 1 ; i <= n ; i ++ )
    {
        parent[i] = i ;
    }
}
 
void sieve() 
{
    for( int i = 0 ; i < p ; i ++ ){ is_prime[i] = true ; r[i] = 0 ; }
    is_prime[0] = false ;
    is_prime[1] = false ;    
    for( int i = 2 ; i*i < p ; i ++ )
    {
        if( is_prime[i] )
        { 
            
            for( int j = i ; j < p ; j += i)
            {
                is_prime[j] = false ;
                r[j] ++ ;
            }
            is_prime[i] = true ;
        }
    }
    till_prime[1] = 0 ;
    for( int i = 2 ; i < p ; i ++ ){ if( is_prime[i] ){ primes.pb(i) ; till_prime[i] = till_prime[i-1] + 1 ; } else{ till_prime[i] = till_prime[i-1] ; }}
    si = primes.size() ;
       
}
void prime()
{
    for( int i = 0 ; i < p ; i ++ )
    {
        spf[i] = i ;
    }
 
    for( int i = 2 ; i < p ; i += 2 )
    { spf[i] = 2 ; }
 
    for( int i = 2 ; i*i < p ; i ++ )
    {
        if( spf[i] == i )
        {
            for( int j = i*i ; j < p ; j += i )
            {
                spf[j] = i; 
            }
        }
    }
}
void dfs(int p , int x )
{
    is_visited[x] = true ;
    int m = edge[x].size() ;

    
    
    
    for( int  i = 0 ; i < m ; i ++ )
    {
        
        if(  !is_visited[edge[x][i]] )
        {
 
            dfs(x,edge[x][i]) ;
        }

    }
                        
 
}

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

   ll tot = 0 ,pos = -1 ; 
   ll n = s.length() ;
   for( ll i = 0 ; i < n ; i ++ ){ if(s[i] != 'a'){  pos = i ; } }


   if( pos == -1 ){ cout <<"NO" ; return ; } 

   cout << "YES\n" ;

   for( int i = 0 ; i < n-pos-1 ; i ++ )
   {
      cout << s[i] ;
   }
   cout <<"a" ;
   for( int i = n-pos-1 ; i < n ; i ++ ){ cout << s[i] ; }

}

 
int main()
{
    ios_base::sync_with_stdio(false) ;
    cin.tie(NULL); 
    cout.tie(NULL) ;
 
#ifndef ONLINE_JUDGE    
    //for getting input from input.txt
    freopen("inputA.txt","r",stdin);
    //for getting output from output.txt
    freopen("outputA.txt","w",stdout);
#endif


     int t ;  cin >> t ;
      
       //int t = 1 ;
       /*factorial(mod) ;
       InverseofNumber(mod) ;
       InverseofFactorial(mod) ;*/
       //sieve() ; 
      
        //cout << si ;
      
      while( t-- )
      {
          solve() ;

          cout <<"\n" ;
      }
    return 0 ;
      
}