import sys
from collections import deque
import copy

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def power_func(a,b,p):
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p

def calc_pattern_num(src, dst, W):
    if W == 1:
        if src == dst :
            return 1
        else:
            return 0

    count = 0
    for i in range(2**(W - 1)):
        is_OK = True
        for j in range((W - 1)):
            if j > 0:
                if ((i >> j) & 0x01)==1 and ((i >> j - 1)& 0x01) == 1:
                    is_OK = False
                    break

            if src - 1 == dst:
                if dst == j:
                    if ((i >> j) & 0x01) == 1:
                        pass
                    else:
                        is_OK = False
                        break
            elif src + 1 == dst:
                if src == j:
                    if ((i >> j) & 0x01) == 1:
                        pass
                    else:
                        is_OK = False
                        break
            elif src == dst:
                if src == j or src - 1 == j:
                    if ((i >> j) & 0x01) == 0 :
                        pass
                    else:
                        is_OK = False
                        break
        if is_OK == True:
            count += 1
    return count


def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [H, W, K] = [long(input_raw[0]), long(input_raw[1]), long(input_raw[2])]
##    field1 = [[[] for i in range(W)] for i in range(H)]
##    for i in range(H):
##        for j in range(W):
##            if j + 1 < W and i % 2 == 0:
##                field1[i][j].append((i, j + 1))
##            if j - 1 >= 0 and i % 2 == 1:
##                field1[i][j].append((i, j - 1))
##            if i + 1 < H:
##                field1[i][j].append((i + 1, j))

    dp = [[0 for j in range(W)] for i in range(H + 1)]
    dp[0][0] = 1L
    p = 1000000007L
    for i in range(H):
        for j in range(W):
            dp[i + 1][j] = (dp[i + 1][j] + ((calc_pattern_num(j, j, W) * dp[i][j])) % p) % p
            if j + 1 < W:
                dp[i + 1][j + 1] = (dp[i + 1][j + 1] + ((calc_pattern_num(j, j + 1, W) * dp[i][j])) % p) % p
            if j - 1 >= 0:
                dp[i + 1][j - 1] = (dp[i + 1][j - 1] + ((calc_pattern_num(j, j - 1, W) * dp[i][j])) % p) % p

    print dp[H][K - 1]


##    field2 = [[[] for i in range(W)] for i in range(H)]
##    for i in range(H):
##        for j in range(W):
##            if j + 1 < W and i % 2 == 1:
##                field2[i][j].append((i, j + 1))
##            if j - 1 >= 0 and i % 2 == 0:
##                field2[i][j].append((i, j - 1))
##            if i + 1 < H:
##                field2[i][j].append((i + 1, j))
##
##    dp2 = [[0 for j in range(W)] for i in range(H)]
##    dp2[0][0] = 1
##
##    for i in range(H):
##        for j in range(W):
##            for adj in field2[i][j]:
##                dp2[adj[0]][adj[1]] = (dp2[adj[0]][adj[1]] + dp2[i][j]) % (1000000007)
##
##    print power_func(2, (dp1[H -1][K - 1] + dp2[H -1][K - 1]) , 1000000007) - 1


if __name__ == '__main__':
    main()


Measured memory_bytes: 3064