#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using ld = long double;

namespace NyaGadget
{

#define each(e, collection) for(auto& e: collection)              // for each
#define size(collection) ((ll) (collection).size())               // collection size

	struct BaseNP
	{	// N進数を表現するクラス
		long long cardinal_;	// 基数
		// シンボルそのものでなく、シンボルに対応するindexを格納していく
		deque<long long> symbol_index_collection_;
		string symbols_[36] =
		{	// 36進数まで対応
			"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
			"A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
			"K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
			"U", "V", "W", "X", "Y", "Z",
		};

		BaseNP(long long cardinal)
		{
			cardinal_ = cardinal;
			symbol_index_collection_.push_back(0);
		}
		void Inc()
		{	// 返り値なしのインクリメント
			bool carry = true;
			long long index = size(symbol_index_collection_) - 1;
			while (0 <= index && carry)
			{
				if (symbol_index_collection_[index] != cardinal_ - 1)
				{
					symbol_index_collection_[index]++;
					carry = false;
				}
				else
				{	// 桁上り
					symbol_index_collection_[index] = 0;
					if (index == 0)
						symbol_index_collection_.push_front(1);
					carry = true;
				}
				index--;
			}
		}
		BaseNP& operator ++()
		{	// 前置インクリメント
			Inc();
			return *this;
		}
		BaseNP operator ++(int)
		{  // 後置インクリメント
			BaseNP np = *this;
			++* this;
			return np;
		}
		/**
		@brief N進数取得関数
		@note
		 d桁のN進数として文字列で取得
		---------------------------------------------------------------------------
		[sample]
		long long main()
		{	// 16進数テスト
			NyaGadgetPositionalNotation pn(16);

			for (long long i = 0; i < 30; i++)
				pn++;

			cout << pn() << endl;		// 30を16進数で表示
			cout << pn(5) << endl;		// 5桁表示

			return 0;
		}
		---------------------------------------------------------------------------
		[output]
		1E
		0001E
		**/
		string operator()(long long d = 0)
		{
			std::string positional_nation;

			each(e, symbol_index_collection_)
				positional_nation += symbols_[e];

			if (d == 0 || d == size(positional_nation))
				return positional_nation;

			if (size(positional_nation) < d)
			{	// 表示桁に空きがあるときは0で埋める
				std::string zero(d - size(positional_nation), '0');
				positional_nation = zero + positional_nation;
			}

			return positional_nation;
		}
		/**
		@brief d桁目を取得する演算子
		@note
		 d桁目の数字を文字列で取得する。
		-------------------------------------------------------------------------- -
		[sample]
		long long main()
		{	// 16進数テスト
			NyaGadgetPositionalNotation pn(16);

			for (long long i = 0; i < 30; i++)
				pn++;

			cout << pn.() << endl;		// 30を16進数で表示
			cout << pn[0] << endl;		// １桁目を表示
			cout << pn[1] << endl;		// ２桁目を表示

			return 0;
		}
		-------------------------------------------------------------------------- -
		[output]
		1E
		E
		1
		**/
		char operator[](long long d)
		{	// d桁目の数字を取得する
			long long index = size(symbol_index_collection_) - 1 - d;
			if (index < 0)
				return symbols_[0][0];
			return symbols_[symbol_index_collection_[index]][0];
		}
	};

#undef each(e, collection)
#undef size(collection)

}

namespace NyaGadget
{	// MOD ライブラリ
	template<ll mod> struct ModLL
	{
		ll x;

		// コンストラクタ
		ModLL()
		{
			x = 0;
		}
		ModLL(ll x_)
		{
			x = x_ % mod + mod;
			if (x >= mod)
				x -= mod;
		}

		// 符号
		ModLL operator + () const { return x; }
		ModLL operator - () const { return (-x < 0) ? mod - x : -x; }

		// 加減乗除演算子
		ModLL& operator += (ModLL r)
		{
			if ((x += r.x) >= mod)
				x -= mod;
			return *this;
		}
		ModLL& operator -= (ModLL r)
		{
			if ((x -= r.x) < 0)
				x += mod;
			return *this;
		}
		ModLL& operator *= (ModLL r)
		{
			x = (unsigned ll) x * r.x % mod;
			return *this;
		}
		ModLL& operator /= (ModLL r)
		{
			x = x * Inv(r.x, mod) % mod;
			return *this;
		}

		ModLL operator + (ModLL r) const { return ModLL(*this) += r; }
		ModLL operator - (ModLL r) const { return ModLL(*this) -= r; }
		ModLL operator * (ModLL r) const { return ModLL(*this) *= r; }
		ModLL operator / (ModLL r) const { return ModLL(*this) /= r; }

		// 逆元 x^{-1} (主に除算演算子で使用)
		ll Inv(ll a, ll m)
		{
			ll b = m, u = 1, v = 0;

			while (b)
			{
				ll t = a / b;
				a -= t * b; swap(a, b);
				u -= t * v; swap(u, v);
			}

			u %= m;

			return (u < 0) ? u + m : u;
		}

		// 比較演算子
		bool operator == (ModLL& r) const { return x == r.x; }
		bool operator != (ModLL& r) const { return x != r.x; }
		bool operator <  (ModLL& r) const { return x < r.x; }
		bool operator <= (ModLL& r) const { return x <= r.x; }
		bool operator >  (ModLL& r) const { return x > r.x; }
		bool operator >= (ModLL& r) const { return x >= r.x; }

		// 入出力演算子
		friend ostream& operator << (ostream& s, ModLL<mod> a)
		{
			s << a.x;
			return s;
		}
		friend istream& operator >> (istream& s, ModLL<mod>& a)
		{
			s >> a.x;
			return s;
		}
	};
}

//*******************************************
// [sample code]
//
//using namespace NyaGadget;
//using mll = ModLL<1000000007>;
//
//int main(void)
//{
//	mll x, y(1000000009);
//  mll div_x(12345678900000);
//  mll div_y(100000);
//
//	div_x /= div_y;
//
//	cout << "x = " << x << endl;
//  cout << "y = " << y << endl;
//  cout << "div_x = " << div_x << endl;
//	return 0;
//}
//*******************************************
// [output]
//
// x = 0
// y = 2
// div_x = 123456789
//*******************************************

#define all(collection) (collection).begin(), (collection).end()  // begin to end
#define ceil(a, b) ceil((ld) a / (ld) b);                         // div ceiling
#define each(e, collection) for(auto& e: collection)              // for each
#define rep(i, begin, end) for (ll i = begin; i < end; i++)       // repeat
#define repr(i, begin, end) for (ll i = begin; end < i; i--)      // repeat reverse
#define size(collection) ((ll) (collection).size())               // collection size

using namespace NyaGadget;
using mll = ModLL<1000000007>;

bool ValidNP(BaseNP& pn, ll w)
{
	string s = pn(w - 1);
	rep(i, 0, size(s) - 1)
	{
		if (s[i] == '1' && s[i] == s[i + 1])
			return false;
	}

	return true;
}

int main(void)
{
	ll h, w, k;
	cin >> h >> w >> k; k--;

	vector<string> vpn;
	BaseNP np(2);
	rep(i, 0, (1LL << w - 1))
	{	// validな1列あみだくじの全パターンを列挙して保存
		if (ValidNP(np, w))
			vpn.push_back(np(w - 1));
		np++;
	}

	vector<vector<mll>> dp(h+1, vector<mll>(w));
	dp[0][0] = 1;
	rep(i, 0, h)
	{
		rep(j, 0, w)
		{
			for (auto& e : vpn)
			{
				if (j + 1 < w && e[j] == '1')
					dp[i + 1][j + 1] += dp[i][j];
				else if (0 <= j - 1 && e[j - 1] == '1')
					dp[i + 1][j - 1] += dp[i][j];
				else
					dp[i + 1][j] += dp[i][j];
			}
		}
	}

	cout << dp.back()[k];
	return 0;
}


Measured memory_bytes: 256