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:

import java.io.*;
import java.util.*;
import java.lang.*;

public class Main {
    static final int MAXN = 100001; // sqrt of 10^9 ;
    static ArrayList<Integer> arr1 = new ArrayList<>();
    static int int_max = Integer.MAX_VALUE;
    static int[] spf = new int[MAXN];

    public static void main(String[] args) throws IOException {
        FastReader sc = new FastReader();
        int l = sc.nextInt();
        for (int t = 1; t <= l; t++) {
            /*int n = sc.nextInt();
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = sc.nextInt();
            }*/
            String s=sc.nextLine();
            int c=0;
            int index=0;
            for(int i=0;i<s.length();i++)
            {
                if(s.charAt(i)=='a')
                    c++;
            }
            for(int i=0;i<s.length();i++)
            {
                if(s.charAt(i)!='a')
                {
                    index=i;
                    break;
                }
            }
            if(c==s.length())
            {
                System.out.println("NO");
            }
            else
            {
                System.out.println("YES");

                System.out.print(s.substring(0,s.length() - index ));
                System.out.print('a');
                System.out.print(s.substring(s.length() - index ));

                System.out.println("");
            }



        }
    }


    static long mod_inv(long a, long m) {
        long m0 = m, t, q;
        long x0 = 0, x1 = 1;

        if (m == 1)
            return 0;

        // Apply extended Euclid Algorithm
        while (a > 1) {
            // q is quotient
            q = a / m;

            t = m;

            // m is remainder now, process
            // same as euclid's algo
            m = a % m;
            a = t;

            t = x0;

            x0 = x1 - q * x0;

            x1 = t;
        }

        // Make x1 positive
        if (x1 < 0)
            x1 += m0;

        return x1;
    } //(a*res)%m==1

    static long power(long x, long y) {
        long res = 1;
        while (y > 0) {
            if ((y & 1) == 1)
                res = res * x;

            y = y >> 1; // y = y/2
            x = x * x;
        }
        return res;
    } //return x^y;

    static int fact(int n) {
        int res = 1;
        for (int i = 2; i <= n; i++)
            res = res * i;
        return res;
    }

    static int ceilSearch(int[] arr, int low, int high, int x) {
        int mid;

        if (x <= arr[low])
            return low;
        if (x > arr[high])
            return -1;

        mid = (low + high) / 2;
        if (arr[mid] == x)
            return mid;
        else if (arr[mid] < x) {
            if (mid + 1 <= high && x <= arr[mid + 1])
                return mid + 1;
            else
                return ceilSearch(arr, mid + 1, high, x);
        } else {
            if (mid - 1 >= low && x > arr[mid - 1])
                return mid;
            else
                return ceilSearch(arr, low, mid - 1, x);
        }
    }

    static int floorSearch(int[] arr, int low, int high, int x) {
        // If low and high cross each other
        if (low > high)
            return -1;

        // If last element is smaller than x
        if (x >= arr[high])
            return high;

        // Find the middle point
        int mid = (low + high) / 2;

        // If middle point is floor.
        if (arr[mid] == x)
            return mid;

        // If x lies between mid-1 and mid
        if (
                mid > 0 && arr[mid - 1] <= x && x < arr[mid])
            return mid - 1;

        // If x is smaller than mid, floor
        // must be in left half.
        if (x < arr[mid])
            return floorSearch(
                    arr, low,
                    mid - 1, x);

        // If mid-1 is not floor and x is
        // greater than arr[mid],
        return floorSearch(
                arr, mid + 1, high,
                x);
    }

    static void sieve() {
        spf[1] = 1;
        for (int i = 2; i < MAXN; i++)
            spf[i] = i;
        for (int i = 4; i < MAXN; i += 2)
            spf[i] = 2;

        for (int i = 3; i * i < MAXN; i++) {
            if (spf[i] == i) {
                for (int j = i * i; j < MAXN; j += i)
                    if (spf[j] == j)
                        spf[j] = i;
            }
        }
    } //spf

    static ArrayList<Integer> getFactorization(int x) {
        sieve();
        ArrayList<Integer> ret = new ArrayList<>();
        while (x != 1) {
            ret.add(spf[x]);
            x = x / spf[x];
        }
        return ret;
    }

    static ArrayList<Integer> sieveOfEratosthenes(int n) {
        ArrayList<Integer> arr = new ArrayList<Integer>();
        boolean[] prime = new boolean[n + 1];
        Arrays.fill(prime, true);
        for (int p = 2; p * p <= n; p++) {
            if (prime[p]) {
                for (int i = p * p; i <= n; i += p)
                    prime[i] = false;
            }
        }
        for (int i = 2; i <= n; i++) {
            if (prime[i])
                arr.add(i);
        }
        return arr;
    }

    static boolean isPrime(int n) {
        if (n <= 1) return false;
        if (n <= 3) return true;
        if (n % 2 == 0 || n % 3 == 0) return false;

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

        return true;
    }

    static int funhelpfulforsegmented(int[] primes, int numprimes) {

        primes[numprimes++] = 2;

        for (int i = 3; i <= 32000; i += 2) {
            boolean isprime = true;
            double cap = Math.sqrt(i) + 1.0;

            for (int j = 0; j < numprimes; j++) {
                if (j >= cap) break;
                if (i % primes[j] == 0) {
                    isprime = false;
                    break;
                }
            }
            if (isprime) primes[numprimes++] = i;
        }
        return numprimes;
    }

    static ArrayList<Integer> segmentedsieve(int M, int N) {
        int[] primes = new int[4000];
        int numprimes = 0;
        numprimes = funhelpfulforsegmented(primes, numprimes);
        ArrayList<Integer> arr = new ArrayList<>();
        if (M < 2) M = 2;
        boolean[] isprime = new boolean[100001];
        for (int j = 0; j < 100001; j++) {
            isprime[j] = true;
        }

        for (int i = 0; i < numprimes; i++) {
            int p = primes[i];
            int start;

            if (p >= M) start = p * 2;
            else start = M + ((p - M % p) % p);

            for (int j = start; j <= N; j += p) {
                isprime[j - M] = false;
            }
        }
        for (int i = M; i <= N; i++) {
            if (isprime[i - M]) arr.add(i);
        }
        return arr;
    }

    static long gcd(long a, long b) {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }

    public static int gcdExtended(int a, int b, int x, int y) {
        if (a == 0) {
            x = 0;
            y = 1;
            return b;
        }

        int x1 = 1, y1 = 1;
        int gcd = gcdExtended(b % a, a, x1, y1);
        x = y1 - (b / a) * x1;
        y = x1;
        return gcd;
    } // ax + by = gcd(a,b) ;

    static long lcm(long a, long b) {
        return (a / gcd(a, b)) * b;
    }

    static void prime_upto_10pow8() {
        boolean[] prime = new boolean[100000000];
        Arrays.fill(prime, true);
        int i;
        prime[1] = false;
        prime[0] = false;
        for (i = 4; i < 100000000; i += 2)
            prime[i] = false;

        prime[2] = true;
        for (i = 3; i * i < 100000000; i += 2) {
            if (prime[i])
                for (int j = i * i; j > 0 && j < 100000000; j = j + (2 * i))
                    prime[j] = false;
        }
        int[] arr = new int[8000000];
        int j = 0;
        arr[0] = 2;
        int n = 100000000;
        for (i = 3; i <= n; i += 2) {
            if (prime[i])
                arr[++j] = i;
        }
        for (i = 1; i <= j; i += 100) {
            System.out.println(arr[i - 1]);
        }
    }
    // int gcd of a nd b is gcdExtended(a, b, x, y);

    static class Pair {
        int a, b;

        Pair(int a, int b) {
            this.a = a;
            this.b = b;
        }
    }

    public static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            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;
        }
    }


}