def check(pattern):

    for i in range(W - 2):

        mask = 0b11 << i

        if pattern & mask == mask:

            return False

    return True





def simulate(a1, pattern):

    pat = [pattern & (1 << w) != 0 for w in range(W - 1)]

    if a1 != W - 1 and pat[a1]:

        return a1 + 1

    elif a1 != 0 and pat[a1 - 1]:

        return a1 - 1

    else:

        return a1





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

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

dp[0][0] = 1

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

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

        for w in range(W):

            if check(pattern):

                dp[h][simulate(w, pattern)] += dp[h - 1][w]

                dp[h][simulate(w, pattern)] %= 1000000007

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

def check(pat):

    for i in range(W - 2):

        mask = 0b11 << i

        if pat & mask == mask:

            return False

    return True





def simulate(a1, pat):

    if a1 != W - 1 and pat & 1 << a1 != 0:

        return a1 + 1

    elif a1 != 0 and pat & 1 << a1 - 1 != 0:

        return a1 - 1

    else:

        return a1





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

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

dp[0][0] = 1

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

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

        for w in range(W):

            if check(pat):

                dp[h][simulate(w, pat)] += dp[h - 1][w]

                dp[h][simulate(w, pat)] %= 1000000007

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

def check(pattern):
    for i in range(W - 2):
        mask = 0b11 << i
        if pattern & mask == mask:
            return False
    return True


def simulate(a1, pattern):
    pat = [pattern & (1 << w) != 0 for w in range(W - 1)]
    if a1 != W - 1 and pat[a1]:
        return a1 + 1
    elif a1 != 0 and pat[a1 - 1]:
        return a1 - 1
    else:
        return a1


H, W, K = list(map(int, input().split()))
dp = [[0] * W for h in range(H + 1)]
dp[0][0] = 1
for h in range(1, H + 1):
    for pattern in range(2 ** (W - 1)):
        for w in range(W):
            if check(pattern):
                dp[h][simulate(w, pattern)] += dp[h - 1][w]
                dp[h][simulate(w, pattern)] %= 1000000007
print((dp[H][K - 1]))

def check(pat):
    for i in range(W - 2):
        mask = 0b11 << i
        if pat & mask == mask:
            return False
    return True


def simulate(a1, pat):
    if a1 != W - 1 and pat & 1 << a1 != 0:
        return a1 + 1
    elif a1 != 0 and pat & 1 << a1 - 1 != 0:
        return a1 - 1
    else:
        return a1


H, W, K = list(map(int, input().split()))
dp = [[0] * W for h in range(H + 1)]
dp[0][0] = 1
for h in range(1, H + 1):
    for pat in range(2 ** (W - 1)):
        for w in range(W):
            if check(pat):
                dp[h][simulate(w, pat)] += dp[h - 1][w]
                dp[h][simulate(w, pat)] %= 1000000007
print((dp[H][K - 1]))

-def check(pattern): +def check(pat): -        if pattern & mask == mask: +        if pat & mask == mask: -def simulate(a1, pattern): -    pat = [pattern & (1 << w) != 0 for w in range(W - 1)] -    if a1 != W - 1 and pat[a1]: +def simulate(a1, pat): +    if a1 != W - 1 and pat & 1 << a1 != 0: -    elif a1 != 0 and pat[a1 - 1]: +    elif a1 != 0 and pat & 1 << a1 - 1 != 0: -    for pattern in range(2 ** (W - 1)): +    for pat in range(2 ** (W - 1)): -            if check(pattern): -                dp[h][simulate(w, pattern)] += dp[h - 1][w] -                dp[h][simulate(w, pattern)] %= 1000000007 +            if check(pat): +                dp[h][simulate(w, pat)] += dp[h - 1][w] +                dp[h][simulate(w, pat)] %= 1000000007