import itertools





h, w, k = list(map(int, input().split()))



if w == 1:

    print((1))

    exit()



mod = 10**9 + 7

path = [[i, i+1] for i in range(w-1)]

DP = [[0]*(h+1) for _ in range(w)]

DP[0][0] = 1



for height in range(h):

    for pos in range(w):

        down_unable = {pos}

        left_unable = {pos-1, pos}

        right_unable = {pos, pos+1}



        down_count = 1

        left_count = 1

        right_count = 1

        for pick in range(1, 1 + w//2):

            all_pattern = list(itertools.combinations(path, pick))



            for pattern in all_pattern:

                check = set()

                possible = True

                for a, b in pattern:

                    if check & {a, b}:

                        possible = False

                        break

                    check |= {a, b}

                if not possible:

                    continue

                if not check & down_unable:

                    down_count += 1

                if not check & left_unable:

                    left_count += 1

                if not check & right_unable:

                    right_count += 1



        if pos == 0:

            DP[pos][height+1] += DP[pos][height] * down_count % mod

            DP[pos+1][height+1] += DP[pos][height] * right_count % mod



        elif pos == w-1:

            DP[pos][height+1] += DP[pos][height] * down_count % mod

            DP[pos-1][height+1] += DP[pos][height] * left_count % mod

        else:

            DP[pos][height+1] += DP[pos][height] * down_count % mod

            DP[pos+1][height+1] += DP[pos][height] * right_count % mod

            DP[pos-1][height+1] += DP[pos][height] * left_count % mod



print((DP[k-1][h] % mod))

import itertools





h, w, k = list(map(int, input().split()))



DP = [0] * w

DP[0] = 1

mod = 10**9 + 7



patterns = []



for line_count in range(w):

    candidates = itertools.combinations(list(range(w-1)), line_count)



    for pattern in candidates:

        usable = True

        prev = 10



        for num in pattern:

            if num == prev + 1:

                usable = False

                break

            else:

                prev = num



        if usable:

            patterns.append(pattern)



for i in range(h):

    next_DP = [0] * w



    for pattern in patterns:

        straight = set(range(w))

        for line in pattern:

            next_DP[line] += DP[line+1]

            next_DP[line] %= mod

            next_DP[line+1] += DP[line]

            next_DP[line+1] % mod

            straight.discard(line)

            straight.discard(line+1)



        for line in straight:

            next_DP[line] += DP[line]

            next_DP[line] %= mod



    DP = next_DP.copy()



ans = DP[k-1]

print((ans%mod))
import itertools

h, w, k = list(map(int, input().split()))
if w == 1:
    print((1))
    exit()
mod = 10**9 + 7
path = [[i, i + 1] for i in range(w - 1)]
DP = [[0] * (h + 1) for _ in range(w)]
DP[0][0] = 1
for height in range(h):
    for pos in range(w):
        down_unable = {pos}
        left_unable = {pos - 1, pos}
        right_unable = {pos, pos + 1}
        down_count = 1
        left_count = 1
        right_count = 1
        for pick in range(1, 1 + w // 2):
            all_pattern = list(itertools.combinations(path, pick))
            for pattern in all_pattern:
                check = set()
                possible = True
                for a, b in pattern:
                    if check & {a, b}:
                        possible = False
                        break
                    check |= {a, b}
                if not possible:
                    continue
                if not check & down_unable:
                    down_count += 1
                if not check & left_unable:
                    left_count += 1
                if not check & right_unable:
                    right_count += 1
        if pos == 0:
            DP[pos][height + 1] += DP[pos][height] * down_count % mod
            DP[pos + 1][height + 1] += DP[pos][height] * right_count % mod
        elif pos == w - 1:
            DP[pos][height + 1] += DP[pos][height] * down_count % mod
            DP[pos - 1][height + 1] += DP[pos][height] * left_count % mod
        else:
            DP[pos][height + 1] += DP[pos][height] * down_count % mod
            DP[pos + 1][height + 1] += DP[pos][height] * right_count % mod
            DP[pos - 1][height + 1] += DP[pos][height] * left_count % mod
print((DP[k - 1][h] % mod))

import itertools

h, w, k = list(map(int, input().split()))
DP = [0] * w
DP[0] = 1
mod = 10**9 + 7
patterns = []
for line_count in range(w):
    candidates = itertools.combinations(list(range(w - 1)), line_count)
    for pattern in candidates:
        usable = True
        prev = 10
        for num in pattern:
            if num == prev + 1:
                usable = False
                break
            else:
                prev = num
        if usable:
            patterns.append(pattern)
for i in range(h):
    next_DP = [0] * w
    for pattern in patterns:
        straight = set(range(w))
        for line in pattern:
            next_DP[line] += DP[line + 1]
            next_DP[line] %= mod
            next_DP[line + 1] += DP[line]
            next_DP[line + 1] % mod
            straight.discard(line)
            straight.discard(line + 1)
        for line in straight:
            next_DP[line] += DP[line]
            next_DP[line] %= mod
    DP = next_DP.copy()
ans = DP[k - 1]
print((ans % mod))

-if w == 1: -    print((1)) -    exit() +DP = [0] * w +DP[0] = 1 -path = [[i, i + 1] for i in range(w - 1)] -DP = [[0] * (h + 1) for _ in range(w)] -DP[0][0] = 1 -for height in range(h): -    for pos in range(w): -        down_unable = {pos} -        left_unable = {pos - 1, pos} -        right_unable = {pos, pos + 1} -        down_count = 1 -        left_count = 1 -        right_count = 1 -        for pick in range(1, 1 + w // 2): -            all_pattern = list(itertools.combinations(path, pick)) -            for pattern in all_pattern: -                check = set() -                possible = True -                for a, b in pattern: -                    if check & {a, b}: -                        possible = False -                        break -                    check |= {a, b} -                if not possible: -                    continue -                if not check & down_unable: -                    down_count += 1 -                if not check & left_unable: -                    left_count += 1 -                if not check & right_unable: -                    right_count += 1 -        if pos == 0: -            DP[pos][height + 1] += DP[pos][height] * down_count % mod -            DP[pos + 1][height + 1] += DP[pos][height] * right_count % mod -        elif pos == w - 1: -            DP[pos][height + 1] += DP[pos][height] * down_count % mod -            DP[pos - 1][height + 1] += DP[pos][height] * left_count % mod -        else: -            DP[pos][height + 1] += DP[pos][height] * down_count % mod -            DP[pos + 1][height + 1] += DP[pos][height] * right_count % mod -            DP[pos - 1][height + 1] += DP[pos][height] * left_count % mod -print((DP[k - 1][h] % mod)) +patterns = [] +for line_count in range(w): +    candidates = itertools.combinations(list(range(w - 1)), line_count) +    for pattern in candidates: +        usable = True +        prev = 10 +        for num in pattern: +            if num == prev + 1: +                usable = False +                break +            else: +                prev = num +        if usable: +            patterns.append(pattern) +for i in range(h): +    next_DP = [0] * w +    for pattern in patterns: +        straight = set(range(w)) +        for line in pattern: +            next_DP[line] += DP[line + 1] +            next_DP[line] %= mod +            next_DP[line + 1] += DP[line] +            next_DP[line + 1] % mod +            straight.discard(line) +            straight.discard(line + 1) +        for line in straight: +            next_DP[line] += DP[line] +            next_DP[line] %= mod +    DP = next_DP.copy() +ans = DP[k - 1] +print((ans % mod))