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

Solution:
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")
inp = lambda: list(map(int,sys.stdin.readline().rstrip("\r\n").split()))
mod = 10**9+7; Mod = 998244353; INF = float('inf')
#______________________________________________________________________________________________________
# from math import *
# from bisect import *
# from heapq import *
# from collections import defaultdict as dd
# from collections import OrderedDict as odict
# from collections import Counter as cc
# from collections import deque
# from itertools import groupby
# sys.setrecursionlimit(10000+10) #this is must for dfs
# ______________________________________________________________________________________________________
# segment tree for range minimum query
# n = int(input())	
# a = list(map(int,input().split()))
# st = [float('inf') for i in range(4*len(a))]
# def build(a,ind,start,end):
# 	if start == end:
# 		st[ind] = a[start]
# 	else:
# 		mid = (start+end)//2
# 		build(a,2*ind+1,start,mid)
# 		build(a,2*ind+2,mid+1,end)
# 		st[ind] = min(st[2*ind+1],st[2*ind+2])
# build(a,0,0,n-1)
# def query(ind,l,r,start,end):
# 	if start>r or end<l:
# 		return float('inf')
# 	if l<=start<=end<=r:
# 		return st[ind]
# 	mid = (start+end)//2
# 	return min(query(2*ind+1,l,r,start,mid),query(2*ind+2,l,r,mid+1,end))
# ______________________________________________________________________________________________________
# Checking prime in O(root(N))
# def isprime(n):
#     if (n % 2 == 0 and n > 2) or n == 1: return 0
#     else:
#         s = int(n**(0.5)) + 1
#         for i in range(3, s, 2):
#             if n % i == 0:
#                 return 0
#         return 1
# def lcm(a,b):
#   return (a*b)//gcd(a,b)
# ______________________________________________________________________________________________________
# nCr under mod
# def C(n,r,mod = 10**9+7):
# 	if r>n: return 0
# 	if r>n-r: r = n-r
# 	num = den = 1
# 	for i in range(r):
# 		num = (num*(n-i))%mod
# 		den = (den*(i+1))%mod
# 	return (num*pow(den,mod-2,mod))%mod
# def C(n,r):
# 	if r>n:
# 		return 0
# 	if r>n-r:
# 		r = n-r
# 	ans = 1
# 	for i in range(r):
# 		ans = (ans*(n-i))//(i+1)
# 	return ans
# ______________________________________________________________________________________________________
# For smallest prime factor of a number
# M = 2*10**5+10
# spf = [i for i in range(M)]
# def spfs(M):
#   for i in range(2,M):
#       if spf[i]==i:
#           for j in range(i*i,M,i):
#               if spf[j]==j:
# 	              spf[j] = i
#   return
# spfs(M)
# ______________________________________________________________________________________________________
# def gtc(p):
#     print('Case #'+str(p)+': ',end='')
# ______________________________________________________________________________________________________
# # not my code
# # To avoid runtime error while using recursive functions
# # Instead of sys.setrecursionlimit(Max_depth) use this
# def bootstrap(f, stack=[]):
#     from types import GeneratorType
#     def wrappedfunc(*args, **kwargs):
#         if stack:
#             return f(*args, **kwargs)
#         else:
#             to = f(*args, **kwargs)
#             while True:
#                 if type(to) is GeneratorType:
#                     stack.append(to)
#                     to = next(to)
#                 else:
#                     if not stack:
#                         break
#                     stack.pop()
#                     to = stack[-1].send(to)
#             return to
#     return wrappedfunc
# #### use this in the previous line of the recursive function '@bootstrap'
# ______________________________________________________________________________________________________
tc = 1
tc = int(input())
for test in range(1,tc+1):
	s = str(input())
	n = len(s)
	if s==s[::-1]:
		for i in range(n):
			if s[i]!='a':
				s = s[:i]+'a'+s[i:]
				break
		else:
			s = s[:(n+1)//2]+'a'+s[(n+1)//2:]
	else:
		s = s[:(n+1)//2]+'a'+s[(n+1)//2:]
	if s!=s[::-1]:
		print("YES")
		print(s)
	else:
		print("NO")