from itertools import product

H, W, K = list(map(int, input().split()))

mod = 10 ** 9 + 7



# dp[i][j]:= 上からi番目, 左からj番目にいる通り数

dp = [[0] * W for i in range(H + 1)]

dp[0][0] = 1





def calc(x):

    if x < 0:

        return 1

    ret = 0

    for p in product(['0', '1'], repeat=x):

        p = ''.join(p)

        if '11' not in p:

            ret += 1

    return ret





for i in range(1, H + 1):

    for j in range(W):

        tmp = 0

        if j > 0:  # 左から

            tmp += dp[i - 1][j - 1] * calc(j - 2) * calc(W - j - 2) % mod



        # 上から

        tmp += dp[i - 1][j] * calc(j - 1) * calc(W - j - 2) % mod



        if j + 1 < W:  # 右から

            tmp += dp[i - 1][j + 1] * calc(j - 1) * calc(W - j - 3) % mod



        dp[i][j] = tmp



print((dp[H][K - 1] % mod))

H, W, K = list(map(int, input().split()))

MOD = 10 ** 9 + 7





def transition(w):

    X = [1, 2, 3, 5, 8, 13, 21, 34]

    if w >= 0:

        return X[w]

    else:

        return 1





# h行w列に到達する方法

dp = [[0] * W for h in range(H + 1)]

dp[0][0] = 1



for h in range(H):

    for w in range(W):

        # 真下へ

        dp[h + 1][w] += dp[h][w] * (transition(w - 1) * transition(W - w - 2))

        dp[h + 1][w] %= MOD



        # 右下へ

        if w + 1 < W:

            dp[h + 1][w + 1] += dp[h][w] * (transition(w - 1) * transition(W - w - 3))

            dp[h + 1][w + 1] %= MOD



        # 左下へ

        if w - 1 >= 0:

            dp[h + 1][w - 1] += dp[h][w] * (transition(w - 2) * transition(W - w - 2))

            dp[h + 1][w - 1] %= MOD



print((dp[H][K - 1]))

from itertools import product

H, W, K = list(map(int, input().split()))
mod = 10**9 + 7
# dp[i][j]:= 上からi番目, 左からj番目にいる通り数
dp = [[0] * W for i in range(H + 1)]
dp[0][0] = 1


def calc(x):
    if x < 0:
        return 1
    ret = 0
    for p in product(["0", "1"], repeat=x):
        p = "".join(p)
        if "11" not in p:
            ret += 1
    return ret


for i in range(1, H + 1):
    for j in range(W):
        tmp = 0
        if j > 0:  # 左から
            tmp += dp[i - 1][j - 1] * calc(j - 2) * calc(W - j - 2) % mod
        # 上から
        tmp += dp[i - 1][j] * calc(j - 1) * calc(W - j - 2) % mod
        if j + 1 < W:  # 右から
            tmp += dp[i - 1][j + 1] * calc(j - 1) * calc(W - j - 3) % mod
        dp[i][j] = tmp
print((dp[H][K - 1] % mod))

H, W, K = list(map(int, input().split()))
MOD = 10**9 + 7


def transition(w):
    X = [1, 2, 3, 5, 8, 13, 21, 34]
    if w >= 0:
        return X[w]
    else:
        return 1


# h行w列に到達する方法
dp = [[0] * W for h in range(H + 1)]
dp[0][0] = 1
for h in range(H):
    for w in range(W):
        # 真下へ
        dp[h + 1][w] += dp[h][w] * (transition(w - 1) * transition(W - w - 2))
        dp[h + 1][w] %= MOD
        # 右下へ
        if w + 1 < W:
            dp[h + 1][w + 1] += dp[h][w] * (transition(w - 1) * transition(W - w - 3))
            dp[h + 1][w + 1] %= MOD
        # 左下へ
        if w - 1 >= 0:
            dp[h + 1][w - 1] += dp[h][w] * (transition(w - 2) * transition(W - w - 2))
            dp[h + 1][w - 1] %= MOD
print((dp[H][K - 1]))

-from itertools import product - -mod = 10**9 + 7 -# dp[i][j]:= 上からi番目, 左からj番目にいる通り数 -dp = [[0] * W for i in range(H + 1)] -dp[0][0] = 1 +MOD = 10**9 + 7 -def calc(x): -    if x < 0: +def transition(w): +    X = [1, 2, 3, 5, 8, 13, 21, 34] +    if w >= 0: +        return X[w] +    else: -    ret = 0 -    for p in product(["0", "1"], repeat=x): -        p = "".join(p) -        if "11" not in p: -            ret += 1 -    return ret -for i in range(1, H + 1): -    for j in range(W): -        tmp = 0 -        if j > 0:  # 左から -            tmp += dp[i - 1][j - 1] * calc(j - 2) * calc(W - j - 2) % mod -        # 上から -        tmp += dp[i - 1][j] * calc(j - 1) * calc(W - j - 2) % mod -        if j + 1 < W:  # 右から -            tmp += dp[i - 1][j + 1] * calc(j - 1) * calc(W - j - 3) % mod -        dp[i][j] = tmp -print((dp[H][K - 1] % mod)) +# h行w列に到達する方法 +dp = [[0] * W for h in range(H + 1)] +dp[0][0] = 1 +for h in range(H): +    for w in range(W): +        # 真下へ +        dp[h + 1][w] += dp[h][w] * (transition(w - 1) * transition(W - w - 2)) +        dp[h + 1][w] %= MOD +        # 右下へ +        if w + 1 < W: +            dp[h + 1][w + 1] += dp[h][w] * (transition(w - 1) * transition(W - w - 3)) +            dp[h + 1][w + 1] %= MOD +        # 左下へ +        if w - 1 >= 0: +            dp[h + 1][w - 1] += dp[h][w] * (transition(w - 2) * transition(W - w - 2)) +            dp[h + 1][w - 1] %= MOD +print((dp[H][K - 1]))