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

MOD = 10**9+7



dp = [0] * W

dp[0] = 1



for i in range(H):

    dp2 = [0] * W

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

        if '11' in bin(b): continue

        b *= 2

        for j in range(W):

            if b&(1<<j):

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

            elif b&(1<<(j+1)):

                dp2[j] += dp[j+1]

            else:

                dp2[j] += dp[j]

            dp2[j] %= MOD

    dp = dp2

print((dp[K-1]))
H,W,K = list(map(int,input().split()))

MOD = 10**9+7



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

dp[0][0] = 1

for i in range(H):

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

        if '11' in bin(b): continue

        for k in range(W):

            if k and b&(1<<(k-1)):

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

            elif b&(1<<k):

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

            else:

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



print((dp[-1][K-1] % MOD))

H, W, K = list(map(int, input().split()))
MOD = 10**9 + 7
dp = [0] * W
dp[0] = 1
for i in range(H):
    dp2 = [0] * W
    for b in range(2 ** (W - 1)):
        if "11" in bin(b):
            continue
        b *= 2
        for j in range(W):
            if b & (1 << j):
                dp2[j] += dp[j - 1]
            elif b & (1 << (j + 1)):
                dp2[j] += dp[j + 1]
            else:
                dp2[j] += dp[j]
            dp2[j] %= MOD
    dp = dp2
print((dp[K - 1]))

H, W, K = list(map(int, input().split()))
MOD = 10**9 + 7
dp = [[0] * W for _ in range(H + 1)]
dp[0][0] = 1
for i in range(H):
    for b in range(1 << (W - 1)):
        if "11" in bin(b):
            continue
        for k in range(W):
            if k and b & (1 << (k - 1)):
                dp[i + 1][k - 1] += dp[i][k]
            elif b & (1 << k):
                dp[i + 1][k + 1] += dp[i][k]
            else:
                dp[i + 1][k] += dp[i][k]
print((dp[-1][K - 1] % MOD))

-dp = [0] * W -dp[0] = 1 +dp = [[0] * W for _ in range(H + 1)] +dp[0][0] = 1 -    dp2 = [0] * W -    for b in range(2 ** (W - 1)): +    for b in range(1 << (W - 1)): -        b *= 2 -        for j in range(W): -            if b & (1 << j): -                dp2[j] += dp[j - 1] -            elif b & (1 << (j + 1)): -                dp2[j] += dp[j + 1] +        for k in range(W): +            if k and b & (1 << (k - 1)): +                dp[i + 1][k - 1] += dp[i][k] +            elif b & (1 << k): +                dp[i + 1][k + 1] += dp[i][k] -                dp2[j] += dp[j] -            dp2[j] %= MOD -    dp = dp2 -print((dp[K - 1])) +                dp[i + 1][k] += dp[i][k] +print((dp[-1][K - 1] % MOD))