1 #include <cstdio>
2 #include <cstring>
3 #include <cstdlib>
4 #include <iostream>
5 #include <algorithm>
6
7 const int MAXN=160;
8 const int MAXK=30;
9 const int MOD=12345678;
10
11 int dp[MAXN][MAXN][MAXK][MAXK];
12
13 int main(){
14 int n;
15 int m;
16 int k;
17 int ans=0;
18 scanf("%d%d%d",&n,&m,&k);
19 dp[0][0][0][0]=1;
20 for(int i=0;i<=n;i++){
21 for(int j=0;j<=m;j++){
22 for(int ii=0;ii<=k;ii++){
23 for(int jj=0;jj<=k;jj++){
24 dp[i+1][j][ii+1][std::max(0,jj-1)]=(dp[i][j][ii][jj]+dp[i+1][j][ii+1][std::max(0,jj-1)])%MOD;
25 dp[i][j+1][std::max(0,ii-1)][jj+1]=(dp[i][j][ii][jj]+dp[i][j+1][std::max(0,ii-1)][jj+1])%MOD;
26 }
27 }
28 }
29 }
30 for(int i=0;i<=k;i++){
31 for(int j=0;j<=k;j++){
32 ans=(dp[n][m][i][j]+ans)%MOD;
33 }
34 }
35 printf("%d\n",ans);
36 return 0;
37 }