MOD = 10**9 + 7



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



pats = []

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

    for i in range(W-2):

        if pat & (1<<i) and pat & (1<<(i+1)):

            break

    else:

        pats.append(pat*2)



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

dp[0][0] = 1

for i in range(H):

    for j in range(W):

        for pat in pats:

            L = pat & (1<<j)

            R = pat & (1<<(j+1))

            if L == 0 and R == 0:

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

            elif L != 0 and R == 0:

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

            elif L == 0 and R != 0:

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

    for j in range(W):

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



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

MOD = 10**9 + 7



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



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

def getFib(i):

    return fibs[i+2]



numLs, numCs, numRs = [0]*W, [0]*W, [0]*W

for j in range(W):

    numCs[j] = getFib(j-1) * getFib(W-1-j-1)

    numLs[j] = getFib(j-2) * getFib(W-1-j-1)

    numRs[j] = getFib(j-1) * getFib(W-1-j-2)



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

dp[0][0] = 1

for i in range(H):

    for j in range(W):

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

        if j > 0:

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

        if j < W-1:

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

    for j in range(W):

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



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

MOD = 10**9 + 7
H, W, K = list(map(int, input().split()))
pats = []
for pat in range(1 << (W - 1)):
    for i in range(W - 2):
        if pat & (1 << i) and pat & (1 << (i + 1)):
            break
    else:
        pats.append(pat * 2)
dp = [[0] * W for _ in range(H + 1)]
dp[0][0] = 1
for i in range(H):
    for j in range(W):
        for pat in pats:
            L = pat & (1 << j)
            R = pat & (1 << (j + 1))
            if L == 0 and R == 0:
                dp[i + 1][j] += dp[i][j]
            elif L != 0 and R == 0:
                dp[i + 1][j - 1] += dp[i][j]
            elif L == 0 and R != 0:
                dp[i + 1][j + 1] += dp[i][j]
    for j in range(W):
        dp[i + 1][j] %= MOD
print((dp[H][K - 1]))

MOD = 10**9 + 7
H, W, K = list(map(int, input().split()))
fibs = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]


def getFib(i):
    return fibs[i + 2]


numLs, numCs, numRs = [0] * W, [0] * W, [0] * W
for j in range(W):
    numCs[j] = getFib(j - 1) * getFib(W - 1 - j - 1)
    numLs[j] = getFib(j - 2) * getFib(W - 1 - j - 1)
    numRs[j] = getFib(j - 1) * getFib(W - 1 - j - 2)
dp = [[0] * W for _ in range(H + 1)]
dp[0][0] = 1
for i in range(H):
    for j in range(W):
        dp[i + 1][j] += dp[i][j] * numCs[j]
        if j > 0:
            dp[i + 1][j - 1] += dp[i][j] * numLs[j]
        if j < W - 1:
            dp[i + 1][j + 1] += dp[i][j] * numRs[j]
    for j in range(W):
        dp[i + 1][j] %= MOD
print((dp[H][K - 1]))

-pats = [] -for pat in range(1 << (W - 1)): -    for i in range(W - 2): -        if pat & (1 << i) and pat & (1 << (i + 1)): -            break -    else: -        pats.append(pat * 2) +fibs = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34] + + +def getFib(i): +    return fibs[i + 2] + + +numLs, numCs, numRs = [0] * W, [0] * W, [0] * W +for j in range(W): +    numCs[j] = getFib(j - 1) * getFib(W - 1 - j - 1) +    numLs[j] = getFib(j - 2) * getFib(W - 1 - j - 1) +    numRs[j] = getFib(j - 1) * getFib(W - 1 - j - 2) -        for pat in pats: -            L = pat & (1 << j) -            R = pat & (1 << (j + 1)) -            if L == 0 and R == 0: -                dp[i + 1][j] += dp[i][j] -            elif L != 0 and R == 0: -                dp[i + 1][j - 1] += dp[i][j] -            elif L == 0 and R != 0: -                dp[i + 1][j + 1] += dp[i][j] +        dp[i + 1][j] += dp[i][j] * numCs[j] +        if j > 0: +            dp[i + 1][j - 1] += dp[i][j] * numLs[j] +        if j < W - 1: +            dp[i + 1][j + 1] += dp[i][j] * numRs[j]