# ABC 113 D

MOD = 7 + 10**9 

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

dp = [[0 for k in range(W)] for l in range(H+1)]



dp[0][0] = 1

for i in range(H):

    for j in range(W):

        for k in range(1<<(W-1)):

            f = 1

            for l in range(W-2):

                if (k>>l)&1 and (k>>(l+1))&1:

                    f = 0

            if f:

                if 0<j and (k>>(j-1))&1:

                    dp[i+1][j-1] += dp[i][j]

                    dp[i+1][j-1] %= MOD

                elif j <= W-2 and (k>>j)&1:

                    dp[i+1][j+1] += dp[i][j]

                    dp[i+1][j+1] %= MOD

                else:

                    dp[i+1][j] += dp[i][j]

                    dp[i+1][j] %= MOD



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

MOD = 10**9 + 7

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

dp = [[0 for k in range(W)] for l in range(H+1)]

dp[0][0] = 1

A = []  # ありうる横棒のリスト

for b in range(2**(W-1)):

    if "11" not in bin(b):

        A.append(bin(b)[2:].zfill(W-1))



for k in range(H):

    for e in A:

        for i in range(W):

            if i < W-1 and e[i] == "1": # 右に行くパターン

                dp[k+1][i+1] += dp[k][i]

                dp[k+1][i+1] %= MOD

            elif i >= 1 and e[i-1] == "1": # 左に行くパターン

                dp[k+1][i-1] += dp[k][i]

                dp[k+1][i-1] %= MOD

            else:

                dp[k+1][i] += dp[k][i]

                dp[k+1][i] %= MOD



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

# ABC 113 D
MOD = 7 + 10**9
H, W, K = list(map(int, input().split()))
dp = [[0 for k in range(W)] for l in range(H + 1)]
dp[0][0] = 1
for i in range(H):
    for j in range(W):
        for k in range(1 << (W - 1)):
            f = 1
            for l in range(W - 2):
                if (k >> l) & 1 and (k >> (l + 1)) & 1:
                    f = 0
            if f:
                if 0 < j and (k >> (j - 1)) & 1:
                    dp[i + 1][j - 1] += dp[i][j]
                    dp[i + 1][j - 1] %= MOD
                elif j <= W - 2 and (k >> j) & 1:
                    dp[i + 1][j + 1] += dp[i][j]
                    dp[i + 1][j + 1] %= MOD
                else:
                    dp[i + 1][j] += dp[i][j]
                    dp[i + 1][j] %= MOD
print((dp[H][K - 1]))

MOD = 10**9 + 7
H, W, K = list(map(int, input().split()))
dp = [[0 for k in range(W)] for l in range(H + 1)]
dp[0][0] = 1
A = []  # ありうる横棒のリスト
for b in range(2 ** (W - 1)):
    if "11" not in bin(b):
        A.append(bin(b)[2:].zfill(W - 1))
for k in range(H):
    for e in A:
        for i in range(W):
            if i < W - 1 and e[i] == "1":  # 右に行くパターン
                dp[k + 1][i + 1] += dp[k][i]
                dp[k + 1][i + 1] %= MOD
            elif i >= 1 and e[i - 1] == "1":  # 左に行くパターン
                dp[k + 1][i - 1] += dp[k][i]
                dp[k + 1][i - 1] %= MOD
            else:
                dp[k + 1][i] += dp[k][i]
                dp[k + 1][i] %= MOD
print((dp[H][K - 1]))

-# ABC 113 D -MOD = 7 + 10**9 +MOD = 10**9 + 7 -for i in range(H): -    for j in range(W): -        for k in range(1 << (W - 1)): -            f = 1 -            for l in range(W - 2): -                if (k >> l) & 1 and (k >> (l + 1)) & 1: -                    f = 0 -            if f: -                if 0 < j and (k >> (j - 1)) & 1: -                    dp[i + 1][j - 1] += dp[i][j] -                    dp[i + 1][j - 1] %= MOD -                elif j <= W - 2 and (k >> j) & 1: -                    dp[i + 1][j + 1] += dp[i][j] -                    dp[i + 1][j + 1] %= MOD -                else: -                    dp[i + 1][j] += dp[i][j] -                    dp[i + 1][j] %= MOD +A = []  # ありうる横棒のリスト +for b in range(2 ** (W - 1)): +    if "11" not in bin(b): +        A.append(bin(b)[2:].zfill(W - 1)) +for k in range(H): +    for e in A: +        for i in range(W): +            if i < W - 1 and e[i] == "1":  # 右に行くパターン +                dp[k + 1][i + 1] += dp[k][i] +                dp[k + 1][i + 1] %= MOD +            elif i >= 1 and e[i - 1] == "1":  # 左に行くパターン +                dp[k + 1][i - 1] += dp[k][i] +                dp[k + 1][i - 1] %= MOD +            else: +                dp[k + 1][i] += dp[k][i] +                dp[k + 1][i] %= MOD