#include <cstring>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <fstream>
#include <queue>
#define rep(i, l, r) for(int i = l; i <= r; i++)
#define down(i, l, r) for(int i = l; i >= r; i--)
#define MS 1234
#define MAX 1037471823
#define Q 12345678
using namespace std;
int n, m, k, f[301][151][21][21], ans;
int main()
{
scanf("%d%d%d", &n, &m, &k);
f[0][0][0][0] = 1;
rep(i, 0, n+m-1) rep(j, 0, n) rep(x, 0, k) rep(y, 0, k) if (f[i][j][x][y])
{
if (x+1 <= k && j+1 <= n) f[i+1][j+1][x+1][max(y-1,0)] += f[i][j][x][y], f[i+1][j+1][x+1][max(y-1,0)] %= Q;
if (y+1 <= k && i-j+1 <= m) f[i+1][j][max(x-1,0)][y+1] += f[i][j][x][y], f[i+1][j][max(x-1,0)][y+1] %= Q;
}
ans = 0;
rep(i, 0, k) rep(j, 0, k) ans = (ans + f[n+m][n][i][j]) % Q;
printf("%d\n", ans);
return 0;
}
I2luY2x1ZGUgPGNzdHJpbmc+CiNpbmNsdWRlIDxjbWF0aD4KI2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPGNzdGRsaWI+CiNpbmNsdWRlIDxjc3RkaW8+CiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPGZzdHJlYW0+CiNpbmNsdWRlIDxxdWV1ZT4KCiNkZWZpbmUgcmVwKGksIGwsIHIpIGZvcihpbnQgaSA9IGw7IGkgPD0gcjsgaSsrKQojZGVmaW5lIGRvd24oaSwgbCwgcikgZm9yKGludCBpID0gbDsgaSA+PSByOyBpLS0pCiNkZWZpbmUgTVMgMTIzNAojZGVmaW5lIE1BWCAxMDM3NDcxODIzCiNkZWZpbmUgUSAxMjM0NTY3OAoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBuLCBtLCBrLCBmWzMwMV1bMTUxXVsyMV1bMjFdLCBhbnM7CgppbnQgbWFpbigpCnsKCXNjYW5mKCIlZCVk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