#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using ull = unsigned long long;

class NyaGadgetPositionalNotation
{	// N進数を表現するクラス
public:
	NyaGadgetPositionalNotation(long long cardinal)
	{
		cardinal_ = cardinal;
		symbol_index_collection_.push_back(0);
	}
	void Inc()
	{	// 返り値なしのインクリメント
		bool carry = true;
		long long index = (long long)symbol_index_collection_.size() - 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--;
		}
	}
	NyaGadgetPositionalNotation operator ++()
	{	// 前置インクリメント
		Inc();
		return *this;
	}
	NyaGadgetPositionalNotation operator ++(int)
	{  // 後置インクリメント
		NyaGadgetPositionalNotation pn = *this;
		Inc();
		return pn;
	}
	/**
	@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;

		for (const auto& e : symbol_index_collection_)
			positional_nation += symbols_[e];

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

		if ((long long)positional_nation.size() < d)
		{	// 表示桁に空きがあるときは0で埋める
			std::string zero(d - positional_nation.size(), '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 = (long long)symbol_index_collection_.size() - 1 - d;
		if (index < 0)
			return symbols_[0][0];
		return symbols_[symbol_index_collection_[index]][0];
	}
private:
	long long cardinal_;	// 基数
	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",
	};
	// シンボルそのものでなく、シンボルに対応するindexを格納していく
	deque<long long> symbol_index_collection_;
};

namespace NyaGadgetModLL
{	// MOD ライブラリ
	using namespace std;

	template<long long mod> struct ModLL
	{
		long long x;

		// コンストラクタ
		ModLL()
		{
			x = 0;
		}
		ModLL(long long 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 long long) 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} (主に除算演算子で使用)
		long long Inv(long long a, long long m)
		{
			long long b = m, u = 1, v = 0;

			while (b)
			{
				long long 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 NyaGadgetModLL;
	//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
	//*******************************************
}

#ifndef __MACRO_H__
#define __MACRO_H__

#define all(collection) (collection).begin(), (collection).end()  // begin to end
#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

#endif

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

bool ValidPN(NyaGadgetPositionalNotation& 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;
	NyaGadgetPositionalNotation pn(2);
	rep(i, 0, (1LL << w - 1))
	{
		if (ValidPN(pn, w))
			vpn.push_back(pn(w-1));
		pn++;
	}

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

	rep(i, 0, h-1)
	{
		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