#include <bits\x14/stdc++.h>
#define int long long
using namespace std;
typedef long long ull;
const int N = 55;
const int M = 110;
const int K = 25;
const int p = 1000000007;
ull n, m, k, f[N][M][K], C[N][N];
void prework()
{
for(int i = 0; i <= k; i++) C[i][0] = C[i][i] = 1;
for(int i = 1; i <= k; i++)
for(int j = 1; j <= k; j++) C[i][j] = C[i - 1][j] + C[i - 1][j - 1];
}
ull c(int n, int m)
{
if(n < m || m < 0) return 0;
return C[n][m];
}
signed main()
{
cin >> n >> m >> k;
prework();
ull bt = 1, bi = 0;
while(bt * 2 <= m) bt <<= 1, bi++;
f[bi + 1][n / (bt * 2)][k] = 1;
//cout << bi << " " << k << " " << endl;
for(int bn = bi; bn >= 0; bn--){ //40
for(int i = 0; i <= k; i++){ // 18
int tms = i * (k - i);
for(int j = tms / 2; j <= 81; j++){ // 81
int rst = 2 * j + (bool)(n & (1ull << bn));
if(rst * 2 - tms * 2 > 81) break;
if(rst - tms < 0) continue;
for(int u = 0; u <= k; u++){//18
if((m & (1ull << bn)) == 0){
if(i <= k - u){
f[bn][rst - tms][u] += f[bn + 1][j][u] * c(k - u, i);
f[bn][rst - tms][u] %= p;
}
}
else{
for(int u1 = u; u1 >= 0; u1--){//18
if(i < u - u1) break;
f[bn][rst - tms][u1] += f[bn + 1][j][u] * (c(u, u - u1) * c(k - u, i - (u - u1)) % p);
f[bn][rst - tms][u1] %= p;
}
}
}
}
}
/*
for(int i = 0; i <= 4; i++){
for(int u = 0; u <= k; u++) cout << f[bn][i][u] << " ";
cout <<endl;
}
cout << endl;
*/
}
ull ans = 0;
for(int i = 0; i <= k; i++) ans += f[0][0][i], ans %= p;
cout << ans % p << endl;
return 0;
}
// 6 2 3