#include <bits/stdc++.h>
using namespace std;
const int N=1000010,Mod=19930726;
int n,k,cnt=0,flag;
long long ret=1;
char s[N];
int check(int l,int r)
{
for (int i=l;i<=(l+r)/2;i++)
{
if (s[i]!=s[r-(i-l)])
{
return 0;
}
}
return 1;
}
int main() {
freopen("rehearse.in","r",stdin);
freopen("rehearse.out","w",stdout);
scanf("%d%d%s",&n,&k,s);
int now=(n+1)/2*2-1;
while (now>0)
{
for (int i=0;i<n-now+1;i++)
{
if (check(i,i+now-1))
{
ret=ret*now%Mod;
cnt++;
if (cnt==k)
{
now=-1;
flag=1;
break;
}
}
}
now-=2;
}
if (flag)
{
cout<<ret;
}
else
{
cout<<-1;
}
}