#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep3(i, l, n) for (int i = l; i < (n); ++i)
#define chmax(a, b) a = (a >= b ? a : b)
#define chmin(a, b) a = (a <= b ? a : b)
#define out(a) cout << a << endl
#define outa(a, n) { rep(_, n) cout << a[_] << " "; cout << endl; }
#define outp(a, n) { cout << endl; rep(_, n) cout << a[_].F << " " << a[_].S << endl; }
#define SZ(v) (int)v.size()
#define inf (int)(1e9+7)
#define abs(x) (x >= 0 ? x : -(x))
#define ceil(a, b) a / b + !!(a % b)
#define FIX(a) fixed << setprecision(a)
#define LB(v, n) (int)(lower_bound(all(v), n) - v.begin())
#define UB(v, n) (int)(upper_bound(all(v), n) - v.begin())
ll pow(ll a, int b) { return b ? pow(a * a, b / 2) * (b % 2 ? a : 1) : 1; }
ll nck(int n, int k) { ll ret = 1; rep(i, k) {ret *= n - i; ret /= i + 1; } return ret; } // n <= 60
template<typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); }

const int mod = 1000000007;

struct mint {
    ll x;
    mint (ll x = 0) : x(x % mod) {}
    mint& operator += (const mint a) { // コンストラクタの、modで割った余りがくる
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator -= (const mint a) {
        if ((x += -a.x + mod) >= mod) x -= mod;
        return *this;
    }
    mint& operator *= (const mint a) {
        (x *= a.x) %= mod;
        return *this;
    }
    mint operator + (const mint a) const {
        mint res(*this);
        return res += a; // ?
    }
    mint operator - (const mint a) const {
        mint res(*this);
        return res -= a;
    }
    mint operator * (const mint a) const {
        mint res(*this);
        return res *= a;
    }
    mint pow(ll t) const { // mint(a).pow(t) tは余りとったりしたらあかん
        if (t == 0) return 1;
        mint a = pow(t >> 1); // 再帰
        a *= a;
        if (t & 1) a *= *this;
        return a;
    }
    
    // 逆元
    mint inv() const {
        return pow(mod - 2);
    }
    mint& operator /= (const mint a) { // invを利用
        return (*this) *= a.inv();
    }
    mint operator / (const mint a) const {
        mint res(*this);
        return res /= a;
    }
    friend ostream &operator<<(ostream &os, const mint &p) {
        return os << p.x;
    }
};

int h, w, k;

mint beki(int j, int j2) {
    if (j > j2) swap(j, j2);
    int key = 0;
    if (j == 0 || j2 == w - 1) key = 1;
    return mint(2).pow(max(0, (key ? w - 1 - 2 : w - 1 - 3)));
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    

    cin >> h >> w >> k;
    
    if (w == 1) { out(1); return 0; }
    
    mint dp[h + 1][w];
    fill_n(*dp, (h + 1) * w, 0); // 列に関して一方向
    
    dp[0][0] = 1;
    
    /*
    // くじの本数の制限なし
    rep3(i, 1, h + 1) rep(j, w) {
        if (j - 1 >= 0) dp[i][j] += dp[i - 1][j - 1] * beki(j - 1, j);
        if (j + 1 <= w - 1) dp[i][j] += dp[i - 1][j + 1] * beki(j, j + 1);
        dp[i][j] += dp[i - 1][j] * beki(j, j) * 2;
    }
    mint tmp = dp[h][k - 1];
    cout << tmp << endl;
    
    rep(i, h + 1) { rep(j, w) cout << dp[i][j] << " "; cout << endl; }
     */
    
    rep(i, h) rep(j, w) rep(k, 1 << (w - 1)) {
        bool ok = true;
        rep(l, w - 2) { // 連続で横にあみだ
            if (k & (1 << l) && k & (1 << (l + 1))) ok = false;
            
        }
        if (!ok) continue;
        
        
        // go to left
        if (j - 1 >= 0 && (k & (1 << (j - 1)))) {
            dp[i + 1][j - 1] += dp[i][j];
            
        }
        
        // go to right
        else if (j + 1 <= w - 1 && (k & (1 << j))) {
            dp[i + 1][j + 1] += dp[i][j];
        }
        
        // go straight
        // if (!(k & (1 << j))) {
        else {
            dp[i + 1][j] += dp[i][j];
        }
        
        /*
        cout << endl;
        cout << i << " " << j << " " << k << endl;
        rep(m, h + 1) { rep(mm, w) cout << dp[m][mm] << " "; cout << endl; }
         */
    }
    
    out(dp[h][k - 1]);
    // rep(m, h + 1) { rep(mm, w) cout << dp[m][mm] << " "; cout << endl; }
}



Measured memory_bytes: 256