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

K -= 1

MOD = 10**9+7



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

dp[0][0] = 1



for i in range(H):

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

        if '11' in bin(b): continue

        b *= 2

        for j in range(W):

            if b&(1<<j):

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

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

            elif b&(1<<(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[-1][K]))

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

MOD = 10**9+7



if W == 1:

    print((1))

    exit()



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

dp[0][0] = 1

for i in range(H):

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

        if '11' in bin(b): continue

        b *= 2

        for j in range(W):

            if b&(1<<j):

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

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

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

            else:

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

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

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

-K -= 1 +if W == 1: +    print((1)) +    exit() -                dp[i + 1][j - 1] %= MOD -                dp[i + 1][j + 1] %= MOD -                dp[i + 1][j] %= MOD -print((dp[-1][K])) +print((dp[-1][K - 1] % MOD))