import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static String hh=""; static HashSeths; static void initialize(String s) { hh=s; hs=new HashSet<>(); } static int answerQuery(int l, int r) { hh=hh.substring(l,r); // Return the answer for this query modulo 1000000007. liststr(hh,0); int mx=0; int c=0; for(String nw:hs) { if(nw.length()==mx) { if(oddpal(nw)||evenpal(nw)) { c++; } } else if(nw.length()>mx) { mx=nw.length(); c=1; } } return c; } static void liststr(String kk, int i) { if(i==kk.length()) { hs.add(kk); } else { liststr(kk,i+1); liststr(kk.substring(0,i)+kk.substring(i+1,kk.length()),i); } } static boolean oddpal(String tm) { int c[]=new int[26]; for(int i=0;i