#include<bits/stdc++.h>
#define FULL(x,y) memset(x,y,sizeof(x))
#define ll long long
#define SZ(x) (int)x.size()
#define pb push_back
using namespace std;

struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};

const int N = 1000006;
const ll mod = 1e9 + 7;
ll n, m, k;
ll inv[N];

ll cal_inv(ll x) {
    ll ans = 1, p = mod - 2;
    while(p) {
        if (p & 1) ans = (ans * x) % mod;
        x = (x * x) % mod;
        p >>= 1;
    }
    return ans;
}

ll cal(ll a, ll b) {
    ll ans = 1;
    for(ll i = a - b + 1; i <= a; ++i) ans = (ans * i) % mod;
    for(ll i = 1; i <= b; ++i) ans = (ans * inv[i]) % mod;
    return ans;
}

int main() {
    cin >> n >> m >> k;
    if (n > m + k) {
        cout << 0;
        return 0;
    }
    for(int i = 1; i <= n; ++i) {
        inv[i] = cal_inv(i);
    }
    ll ans1 = cal(n + m, n);
    ll tmp = n - k - 1 < 0 ? 0 : cal(n + m, n - k - 1);
    ans1 = (ans1 - tmp + mod) % mod;
    cout << ans1 << endl;
    return 0;
}

#include <iostream>
#include <iomanip>
#include <utility>
#include <cmath>
#include <random>
#include <vector>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
using namespace std;

#define rep(i,n) for(int i = 0; i<n; ++i)
#define REP(i,n) for(int i = 1; i<=n; ++i)
#define all(x) begin(x),end(x)
#define show(obj) {for(auto x:obj)cout<<x<<' ';cout<<endl;}
#define line "----------"
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll,ll> LP;
const int inf = 1001001000;
const ll INF = 1LL<<60;
const int MOD = (int)1e9 + 7;

int H, W;
char nap[2020][2020];
ll memo[2020][2020];
ll sum_tate[2020][2020];
ll sum_yoko[2020][2020];
ll sum_naname[2020][2020];

ll solve(int i, int j){
    if(memo[i][j] != -1) return memo[i][j];
    if(i == H && j == W) return 1;
    ll res = 0;
    if(i < H && nap[i+1][j] == '.'){
        ll tate = solve(i+1, j);
        sum_tate[i][j] = sum_tate[i+1][j] + tate;
        sum_tate[i][j] %= MOD;
    }
    if(j < W && nap[i][j+1] == '.'){
        ll yoko = solve(i, j + 1);
        sum_yoko[i][j] = sum_yoko[i][j+1] + yoko;
        sum_yoko[i][j] %= MOD;
    }
    if(i < H && j < W && nap[i+1][j+1] == '.'){
        ll naname = solve(i + 1, j + 1);
        sum_naname[i][j] = sum_naname[i+1][j+1] + naname;
        sum_naname[i][j] %= MOD;
    }
    return memo[i][j] = (sum_yoko[i][j] + sum_tate[i][j] + sum_naname[i][j]) % MOD;
}

int main(){
    cin >> H >> W;
    REP(i,H)REP(j,W)cin >> nap[i][j];
    rep(i,2020)rep(j,2020)memo[i][j] = -1, sum_naname[i][j] = 0, sum_tate[i][j] = 0, sum_yoko[i][j] = 0;
    cout << solve(1,1) << endl;
    //REP(i,H){REP(j,W)cout << memo[i][j] << ' '; cout << endl;}
    return 0;
}
