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 JAVA):

Solution:
// package eround101;

import java.util.*;
import java.io.*;
import java.lang.*;
import java.util.StringTokenizer;
import java.util.concurrent.TimeUnit;

public class C101 {

    static HritikScanner sc = new HritikScanner();
    static PrintWriter pw = new PrintWriter(System.out, true);
    final static int MOD = (int) 1e9 + 7;
    static StringBuilder sb = new StringBuilder();

    public static void main(String[] args) {

        int t = ni();
        while (t-- > 0) {
            solve();
        }
    }

    static void solve() {
        char[] arr = sc.next().toCharArray();
        int n = arr.length;
        if(arr[0] == 'a' && arr[n - 1] != 'a')
        {
            pl("YES");
            p('a');
            for(char ele : arr)
            {
                p(ele);
            }
            pl();
            return;
        }
        if(arr[0] != 'a' && arr[n - 1] == 'a')
        {
            pl("YES");
            for(char ele : arr)
            {
                p(ele);
            }
            p('a');
            pl();
            return;
        }
        if(arr[0] != 'a' && arr[n - 1] != 'a')
        {
            pl("YES");
            for(char ele : arr)
            {
                p(ele);
            }
            p('a');
            pl();
            return;
        }
         int cas = 0;
         int cal = 0;
         for(int i = 0; i < n; i++)
         {
             if(arr[i] != 'a')
                 break;
             cas++;
         }
         if(cas == n)
         {
             pl("NO");
             return;
         }
         for(int i = n - 1; i >= 0; i--)
         {
             if(arr[i] != 'a')
                 break;
             cal++;
         }
         if(cas == cal)
         {
             pl("YES");
             for(char ele : arr)
            {
                p(ele);
            }
            p('a');
            pl();
            return;
         }
         if(cas < cal)
         {
             pl("YES");
             for(char ele : arr)
            {
                p(ele);
            }
            p('a');
            pl();
            return;
         }
         if(cas > cal)
         {
             pl("YES");
             p('a');
             for(char ele : arr)
            {
                p(ele);
            }
            pl();
            return;
         }
    }
    
    

    /////////////////////////////////////////////////////////////////////////////////
    static int[] nextIntArray(int n) {
        int[] arr = new int[n];
        int i = 0;
        while (i < n) {
            arr[i++] = ni();
        }
        return arr;
    }

    static long[] nextLongArray(int n) {
        long[] arr = new long[n];
        int i = 0;
        while (i < n) {
            arr[i++] = nl();
        }
        return arr;
    }

    static int[] nextIntArray1(int n) {
        int[] arr = new int[n + 1];
        int i = 1;
        while (i <= n) {
            arr[i++] = ni();
        }
        return arr;
    }

    /////////////////////////////////////////////////////////////////////////////////
    static int ni() {
        return sc.nextInt();
    }

    static long nl() {
        return sc.nextLong();
    }

    static double nd() {
        return sc.nextDouble();
    }

    /////////////////////////////////////////////////////////////////////////////////
    static void pl() {
        pw.println();
    }

    static void p(Object o) {
        pw.print(o);
    }

    static void pl(Object o) {
        pw.println(o);
    }

    static void psb(StringBuilder sb) {
        pw.print(sb);
    }

    static void pa(Object arr[]) {
        for (Object o : arr) {
            p(o);
        }
        pl();
    }

    static void pa(int arr[]) {
        for (int o : arr) {
            p(o);
        }
        pl();
    }

    static void pa(long arr[]) {
        for (long o : arr) {
            p(o);
        }
        pl();
    }

    static void pa(double arr[]) {
        for (double o : arr) {
            p(o);
        }
        pl();
    }

    static void pa(char arr[]) {
        for (char o : arr) {
            p(o);
        }
        pl();
    }

    static void pa(List list) {
        for (Object o : list) {
            p(o);
        }
        pl();
    }

    static void pa(Object[][] arr) {

        for (int i = 0; i < arr.length; ++i) {
            for (Object o : arr[i]) {
                p(o);
            }
            pl();
        }
    }

    static void pa(int[][] arr) {
        for (int i = 0; i < arr.length; ++i) {
            for (int o : arr[i]) {
                p(o);
            }
            pl();
        }
    }

    static void pa(long[][] arr) {
        for (int i = 0; i < arr.length; ++i) {
            for (long o : arr[i]) {
                p(o);
            }
            pl();
        }
    }

    static void pa(char[][] arr) {
        for (int i = 0; i < arr.length; ++i) {
            for (char o : arr[i]) {
                p(o);
            }
            pl();
        }
    }

    static void pa(double[][] arr) {
        for (int i = 0; i < arr.length; ++i) {
            for (double o : arr[i]) {
                p(o);
            }
            pl();
        }
    }

/////////////////////////////////////////////////////////////////////////////////
    static void print(Object s) {
        System.out.println(s);
    }

    /////////////////////////////////////////////////////////////////////////////////
    //-----------HritikScanner class for faster input----------//
    static class HritikScanner {

        BufferedReader br;
        StringTokenizer st;

        public HritikScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    //////////////////////////////////////////////////////////////////
    public static class Pair implements Comparable<Pair> {

        int x, y;

        Pair(int index, int token) {
            this.x = index;
            this.y = token;

        }

        public int get1() {
            return x;
        }

        public int get2() {
            return y;
        }

        public int compareTo(Pair A) {
            return this.y - A.y;
        }
    }

    //////////////////////////////////////////////////////////////////
    // Function to return gcd of a and b time complexity O(log(a+b))
    static long gcd(long a, long b) {
        if (a == 0) {
            return b;
        }
        return gcd(b % a, a);
    }

    // method to return LCM of two numbers 
    static long lcm(int a, int b) {
        return (a / gcd(a, b)) * b;
    }

    //////////////////////////////////////////////////////////////////
    static boolean isPrime(long n) {
        // Corner cases 
        if (n <= 1) {
            return false;
        }
        if (n <= 3) {
            return true;
        }

        // This is checked so that we can skip  
        // middle five numbers in below loop 
        if (n % 2 == 0 || n % 3 == 0) {
            return false;
        }

        for (long i = 5; i * i <= n; i = i + 6) {
            if (n % i == 0 || n % (i + 2) == 0) {
                return false;
            }
        }

        return true;
    }
    //////////////////////////////////////////////////////////////////

    static boolean isPowerOfTwo(long n) {
        if (n == 0) {
            return false;
        }

        return (long) (Math.ceil((Math.log(n) / Math.log(2))))
                == (long) (Math.floor(((Math.log(n) / Math.log(2)))));
    }

    public static long getFact(int n) {
        long ans = 1;
        while (n > 0) {
            ans *= n;
            ans %= MOD;
            n--;
        }
        return ans;
    }

    public static long pow(long n, int pow) {
        if (pow == 0) {
            return 1;
        }
        long temp = pow(n, pow / 2) % MOD;
        temp *= temp;
        temp %= MOD;
        if (pow % 2 == 1) {
            temp *= n;
        }
        temp %= MOD;
        return temp;

    }

    public static long nCr(int n, int r) {
        long ans = 1;
        int temp = n - r;
        while (n > temp) {
            ans *= n;
            ans %= MOD;
            n--;
        }
        ans *= pow(getFact(r) % MOD, MOD - 2) % MOD;
        ans %= MOD;
        return ans;
    }

    //////////////////////////////////////////////////////////////////
    // method returns Nth power of A 
    static double nthRoot(int A, int N) {

        // intially guessing a random number between 
        // 0 and 9 
        double xPre = Math.random() % 10;

        // smaller eps, denotes more accuracy 
        double eps = 0.001;

        // initializing difference between two 
        // roots by INT_MAX 
        double delX = 2147483647;

        // xK denotes current value of x 
        double xK = 0.0;

        // loop untill we reach desired accuracy 
        while (delX > eps) {
            // calculating current value from previous 
            // value by newton's method 
            xK = ((N - 1.0) * xPre
                    + (double) A / Math.pow(xPre, N - 1)) / (double) N;
            delX = Math.abs(xK - xPre);
            xPre = xK;
        }

        return xK;
    }

}