#include"cstdio" #include"queue" #include"cmath" #include"stack" #include"iostream" #include"algorithm" #include"cstring" #include"queue" #include"map" #include"set" #include"vector" #define LL long long #define ull unsigned long long #define mems(a,b) memset(a,b,sizeof(a)) #define ls pos<<1 #define rs pos<<1|1 using namespace std; const int N = 1e5+5; const int MOD = 9973; const int INF = 0x3f3f3f3f; int pre[N]; int inv[10005]; int n,l,r,len; char s[N]; int main(){ pre[0]=1; inv[0]=0; inv[1]=1; for(int i=2;i<=MOD;i++) inv[i]=inv[MOD%i]*(MOD-MOD/i)%MOD; while(scanf("%d",&n)!=EOF){ scanf("%s",s+1); len=strlen(s+1); for(int i=1;i<=len;i++) pre[i]=(s[i]-28)*pre[i-1]%MOD; for(int i=0;i