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

MOD = 10**9+7

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

dp[0][0] = 1

ls = []

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

  log = ''

  flag = True

  for x in range(W-1):

    if h%2==1 and flag:

      log += '1'

      flag = False

    else:

      log += '0'

      flag = True

    h >>= 1

  ls += [log]

if W==1:

  ls = ['0']

ls = set(ls)

for i in range(H):

  for j in range(W):

#    print(dp[-1], j)

    for log in ls:

      if j==0:

        if log[j]=='1':

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

        else:

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

      elif j==W-1:

        if log[j-1]=='1':

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

        else:

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

      else:

        if log[j-1]=='1':

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

        elif log[j]=='1':

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

        else:

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

print((dp[-1][K-1]%MOD))
H, W, K = list(map(int, input().split()))

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

A[0][0] = 1

MOD = 10**9+7

for i in range(H):

  for j in range(W):

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

      for l in range(W-1):

        if (k>>l)&1 and (k>>(l+1))&1:

          break

      else:

        if j>0 and (k>>(j-1))&1:

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

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

        elif j<W-1 and (k>>j)&1:

          A[i+1][j+1] += A[i][j]

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

        else:

          A[i+1][j] += A[i][j]

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



print((A[H][K-1]))
H, W, K = list(map(int, input().split()))
MOD = 10**9 + 7
dp = [[0] * W for i in range(H + 1)]
dp[0][0] = 1
ls = []
for h in range(2 ** (W - 1)):
    log = ""
    flag = True
    for x in range(W - 1):
        if h % 2 == 1 and flag:
            log += "1"
            flag = False
        else:
            log += "0"
            flag = True
        h >>= 1
    ls += [log]
if W == 1:
    ls = ["0"]
ls = set(ls)
for i in range(H):
    for j in range(W):
        #    print(dp[-1], j)
        for log in ls:
            if j == 0:
                if log[j] == "1":
                    dp[i + 1][j + 1] += dp[i][j] % MOD
                else:
                    dp[i + 1][j] += dp[i][j] % MOD
            elif j == W - 1:
                if log[j - 1] == "1":
                    dp[i + 1][j - 1] += dp[i][j] % MOD
                else:
                    dp[i + 1][j] += dp[i][j] % MOD
            else:
                if log[j - 1] == "1":
                    dp[i + 1][j - 1] += dp[i][j] % MOD
                elif log[j] == "1":
                    dp[i + 1][j + 1] += dp[i][j] % MOD
                else:
                    dp[i + 1][j] += dp[i][j] % MOD
print((dp[-1][K - 1] % MOD))

H, W, K = list(map(int, input().split()))
A = [[0] * W for i in range(H + 1)]
A[0][0] = 1
MOD = 10**9 + 7
for i in range(H):
    for j in range(W):
        for k in range(1 << (W - 1)):
            for l in range(W - 1):
                if (k >> l) & 1 and (k >> (l + 1)) & 1:
                    break
            else:
                if j > 0 and (k >> (j - 1)) & 1:
                    A[i + 1][j - 1] += A[i][j]
                    A[i + 1][j - 1] %= MOD
                elif j < W - 1 and (k >> j) & 1:
                    A[i + 1][j + 1] += A[i][j]
                    A[i + 1][j + 1] %= MOD
                else:
                    A[i + 1][j] += A[i][j]
                    A[i + 1][j] %= MOD
print((A[H][K - 1]))

+A = [[0] * W for i in range(H + 1)] +A[0][0] = 1 -dp = [[0] * W for i in range(H + 1)] -dp[0][0] = 1 -ls = [] -for h in range(2 ** (W - 1)): -    log = "" -    flag = True -    for x in range(W - 1): -        if h % 2 == 1 and flag: -            log += "1" -            flag = False -        else: -            log += "0" -            flag = True -        h >>= 1 -    ls += [log] -if W == 1: -    ls = ["0"] -ls = set(ls) -        #    print(dp[-1], j) -        for log in ls: -            if j == 0: -                if log[j] == "1": -                    dp[i + 1][j + 1] += dp[i][j] % MOD +        for k in range(1 << (W - 1)): +            for l in range(W - 1): +                if (k >> l) & 1 and (k >> (l + 1)) & 1: +                    break +            else: +                if j > 0 and (k >> (j - 1)) & 1: +                    A[i + 1][j - 1] += A[i][j] +                    A[i + 1][j - 1] %= MOD +                elif j < W - 1 and (k >> j) & 1: +                    A[i + 1][j + 1] += A[i][j] +                    A[i + 1][j + 1] %= MOD -                    dp[i + 1][j] += dp[i][j] % MOD -            elif j == W - 1: -                if log[j - 1] == "1": -                    dp[i + 1][j - 1] += dp[i][j] % MOD -                else: -                    dp[i + 1][j] += dp[i][j] % MOD -            else: -                if log[j - 1] == "1": -                    dp[i + 1][j - 1] += dp[i][j] % MOD -                elif log[j] == "1": -                    dp[i + 1][j + 1] += dp[i][j] % MOD -                else: -                    dp[i + 1][j] += dp[i][j] % MOD -print((dp[-1][K - 1] % MOD)) +                    A[i + 1][j] += A[i][j] +                    A[i + 1][j] %= MOD +print((A[H][K - 1]))