import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { StringBuilder sb = new StringBuilder(sc.next()); StringBuilder ans = new StringBuilder("NA"); if (sb.length()%2==0) { String s = sb.toString(); String str = sb.insert(sb.length()/2,"a").reverse().toString(); sb.setLength(0); sb.append(s); for (int i=0; i<=sb.length(); i++) { sb.insert(i,str.charAt(i)); int count = 0; for (int j=0; j