#include <bits/stdc++.h>
using namespace std;
using pint = pair<int, int>;
using ll = long long;
using ull = unsigned long long;
using vll = vector<long long>;
using pll = pair<ll, ll>;
#define FOR(i, begin, end) for (int i = (begin), i##_end_ = (end); i < i##_end_; i++)
#define IFOR(i, begin, end) for (int i = (end)-1, i##_begin_ = (begin); i >= i##_begin_; i--)
#define REP(i, n) FOR(i, 0, n)
#define IREP(i, n) IFOR(i, 0, n)
#define VREP(s, ite) for (auto ite = s.begin(); ite != s.end(); ++ite)
#define FI first
#define SE second
#define ALL(v) v.begin(),v.end()
//#define endl "\n"
#define ciosup  \
    cin.tie(0); \
    ios::sync_with_stdio(false);
#define eb emplace_back
#define vint vector<int>
constexpr ll INF = 1e18 + 7LL;
constexpr ll MOD = 1e9 + 7;

template <typename T>
istream& operator>>(istream& is, vector<T> &v)
{
    for (int i = 0; i < v.size(); ++i)
    {
        is >> v[i];
    }
    return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v)
{
    for (int i = 0; i < v.size()-1; ++i)
    {
        os << v[i] << " ";
    }
    if (v.size() > 0){
        os << v[v.size() - 1] << endl;
    }
    return os;
}
template <std::uint_fast64_t Modulus>
class Modint
{
    using u64 = std::uint_fast64_t;

public:
    u64 a;
    constexpr Modint(const u64 x = 0) noexcept : a(x % Modulus) {}
    constexpr u64 &value() noexcept { return a; }
    constexpr const u64 &value() const noexcept { return a; }
    constexpr Modint operator+(const Modint rhs) const noexcept
    {
        return Modint(*this) += rhs;
    }
    constexpr Modint operator-(const Modint rhs) const noexcept
    {
        return Modint(*this) -= rhs;
    }
    constexpr Modint operator*(const Modint rhs) const noexcept
    {
        return Modint(*this) *= rhs;
    }
    constexpr Modint operator/(const Modint rhs) const noexcept
    {
        return Modint(*this) /= rhs;
    }
    constexpr Modint &operator+=(const Modint rhs) noexcept
    {
        a += rhs.a;
        if (a >= Modulus)
        {
            a -= Modulus;
        }
        return *this;
    }
    constexpr Modint &operator-=(const Modint rhs) noexcept
    {
        if (a < rhs.a)
        {
            a += Modulus;
        }
        a -= rhs.a;
        return *this;
    }
    constexpr Modint &operator*=(const Modint rhs) noexcept
    {
        a = a * rhs.a % Modulus;
        return *this;
    }
    constexpr Modint &operator/=(Modint rhs) noexcept
    {
        u64 exp = Modulus - 2;
        while (exp)
        {
            if (exp % 2)
            {
                *this *= rhs;
            }
            rhs *= rhs;
            exp /= 2;
        }
        return *this;
    }
};
using Mint = Modint<MOD>;
ostream &operator<<(ostream &os, const Mint rhs)
{
    os << rhs.a;
    return os;
}

ll extgcd(ll a, ll b, ll &x, ll &y)
{ //extended Euclidean algorithm, used for modular multiplicative inverse
    ll d = a;
    if (b != 0)
    {
        d = extgcd(b, a % b, y, x);
        y -= (a / b) * x;
    }
    else
    {
        x = 1;
        y = 0;
    }
    return d; //return gcd(a,b)
}

ll mod_inv(ll a, ll m = MOD)
{ //return inv(a) mod m, ax+my=gcd(a,m)=1, m is prime int, ax-1=mq equiv. ax-mq=1
    ll x, y;
    extgcd(a, m, x, y);
    return (m + x % m) % m; //From (possibly) negative x to positive x
}

int main()
{
    ll h, w, k;
    cin >> h >> w >> k;
    --k;
    Mint dp[h + 1][w];
    dp[0][0] = 1;
    REP(i,h){
        REP(j,w)
        {
            for (int m = 0; m < (1LL << (w-1)); ++m)
            {
                bool flag = false;
                for (int l = 1; l < (1LL << (w - 2)); l <<= 1)
                {
                    if ((m & l) && (m & (l << 1))){
                        flag = true;
                        break;
                    }
                }
                if (flag) continue;
                if (j - 1 >= 0 && ((1 << (j - 1)) & m))
                {
                    dp[i + 1][j - 1] += dp[i][j];
                }
                else if (j + 1 <= w - 1 && ((1 << j) & m))
                {
                    dp[i + 1][j + 1] += dp[i][j];
                }else{
                    dp[i + 1][j] += dp[i][j];
                }
            }
        }
    }
    cout << dp[h][k] << endl;
}

Measured memory_bytes: 256