///1085422276
#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<queue>
#include<cmath>
#include<map>
#include<bitset>
#include<set>
#include<vector>
using namespace std ;
typedef long long ll;
#define mem(a) memset(a,0,sizeof(a))
#define meminf(a) memset(a,127,sizeof(a))
#define memfy(a) memset(a,-1,sizeof(a))
#define TS printf("111111\n")
#define FOR(i,a,b) for( int i=a;i<=b;i++)
#define FORJ(i,a,b) for(int i=a;i>=b;i--)
#define READ(a,b) scanf("%d%d",&a,&b)
#define g 9.8
#define mod 12345678
#define eps 1e-7
#define maxn 1000000+10
#define inf 10000000000;
inline ll read()
{
ll x=0,f=1;
char ch=getchar();
while(ch<‘0‘||ch>‘9‘)
{
if(ch==‘-‘)f=-1;
ch=getchar();
}
while(ch>=‘0‘&&ch<=‘9‘)
{
x=x*10+ch-‘0‘;
ch=getchar();
}
return x*f;
}
//****************************************
int dp[200][200][30][30];
int main()
{
mem(dp);
int n=read(),m=read(),k=read();dp[0][0][0][0]=1;
FOR(i,0,n)FOR(j,0,m)FOR(k1,0,k)FOR(k2,0,k){
dp[i+1][j][k1+1][max(k2-1,0)]+=dp[i][j][k1][k2];dp[i+1][j][k1+1][max(k2-1,0)]%=mod;
dp[i][j+1][max(k1-1,0)][k2+1]+=dp[i][j][k1][k2];dp[i][j+1][max(k1-1,0)][k2+1]%=mod;
}ll ans=0;
FOR(i,0,k)FOR(j,0,k){ans+=dp[n][m][i][j];ans%=mod;}
cout<<ans<<endl;
return 0;
}