#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define ff first
#define ss second
const char nl = '\n';
/* -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- */
#include <bits/extc++.h>
namespace pbds =  __gnu_pbds;
template <typename key, typename val=pbds::null_type, typename comp=less<key> >
using ostree = pbds::tree<key, val, comp, pbds::rb_tree_tag,
                          pbds::tree_order_statistics_node_update>;
using vi = vector< int >; using vll = vector< ll >;
#define allOf(x) std::begin(x), std::end(x)
template <typename...Args>
ostream&operator<<(ostream&os, pair<Args...> const &p)
{return os<<'('<<p.first<<", "<<p.second<<')';}
template <typename...Args>
ostream&operator<<(ostream&os, vector<Args...> const &v)
{os<<'[';for(const auto&el:v)os<<' '<<el;return(os<<" ]");}
template <typename...Args> ostream&operator<<(ostream&os, map<Args...>const&v)
{os<<'[';for(auto const&el:v)os<<' '<<el;return(os<<" ]");}
template <typename...Args> ostream&operator<<(ostream&os, set<Args...>const&v)
{os<<'[';for(auto const&el:v)os<<' '<<el;return(os<<" ]");}
template <typename...Args>
ostream&operator<<(ostream&os, unordered_map<Args...>const&v)
{os<<'[';for(auto const&el:v)os<<' '<<el;return(os<<" ]");}
template<typename T> void trace_rec(stringstream&sst, const T&t)
{ string arg; getline(sst, arg, ','); cerr << arg << " : " << t << " }"; }
template<typename T, typename... Args>
void trace_rec(stringstream&sst, const T&t, const Args... args)
{ string arg; getline(sst, arg, ','); cerr << arg << " : " << t << ", ";
  trace_rec(sst, args...); }
template<typename... Args> void trace(const string&s, Args... args)
{stringstream sst(s); cerr << "{ "; trace_rec(sst, args...); cerr << endl;}
#define dbg(...) trace(#__VA_ARGS__, __VA_ARGS__)
template <typename T> void dbr(const T lb, const T ub)
{cerr<<'{';for(auto it=lb; it!=ub; it++)cerr<<' '<<(*it);cerr<<" }"<<endl;}
template<typename T, typename Comp=less<T> >
bool setMin(T &mem, const T&v, Comp comp = Comp())
{ return comp(v, mem) ? mem = v, true : false; }
template<typename T, typename Comp=less<T> >
bool setMax(T &mem, const T&v, Comp comp = Comp())
{ return comp(mem, v) ? mem = v, true : false; }
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
/* -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- */

const ll mod = 7+(int)(1e9);

int H, W, K;

bool can[1<<7];
int nxt[1<<7][8];
ll dp[111][10];
ll fx(int ht = 0, int idx = K) {
  ll &d = dp[ht][idx];
  if( d != -1 ) return d;
  if( ht == H ) { d = ( idx == 0 ? 1 : 0 ); return d; }
  d = 0;
  for(int conf=0; conf<(1<<(W-1)); conf++) {
    if(not can[conf]) continue;
    if(nxt[conf][idx] == -1) d += fx(ht+1, idx);
    else d += fx(ht+1, nxt[conf][idx]);
    d %= mod;
    // dbg(ht, idx, bitset<8>(conf), );
  }
  return d;
}

int main() {
  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

  cin >> H >> W >> K; K--;
  if( W == 1 ) {
    cout << 1 << endl;
    return 0;
  }

  memset(dp, -1, sizeof dp);
  memset(nxt, -1, sizeof nxt);
  for(int i=0; i<(1<<7); i++) {
    vi foo(7, 0);
    for(int j=0; j<7; j++) { if( (i&(1<<j)) ) foo[j] = 1; }
    can[i] = true;
    for(int j=1; j<7; j++) if( foo[j] == foo[j-1] and foo[j] == 1 ) can[i] = 0;
    if(can[i]) {
      for(int j=0; j<7; j++) {
        if( foo[j] ) nxt[i][j] = j+1, nxt[i][j+1] = j;
      }
    }
  }

  cout << fx() << endl;

  return 0;
}

/* -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- -*- */


Measured memory_bytes: 256