h,w,k=list(map(int,input().split()));p=[sum(('11'in str(bin(j)))^1for j in range(1<<i))for i in range(8)];d=[w*[0]for _ in[0]*-~h];d[0][0]=1

for i in range(h):

 b=d[i]

 for j in range(w):

  t=u=D=0

  if j:t=p[max(0,j-2)]*p[max(0,w-j-2)];D=b[j-1]*t

  if j<w-1:u=p[max(0,j-1)]*p[max(0,w-j-3)];D+=b[j+1]*u

  d[i+1][j]=(b[j]*(p[w-1]-t-u)+D)%(10**9+7)

print((d[-1][k-1]))
h,w,k=list(map(int,input().split()))

p=[sum(('11'in str(bin(j)))^1for j in range(1<<i))for i in range(8)]

dp=[w*[0]for _ in[0]*-~h]

dp[0][0]=1

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

    for j in range(w):

        t=u=0

        if j:

            t=p[max(0,j-2)]*p[max(0,w-j-2)]

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

        if j<w-1:

            u=p[max(0,j-1)]*p[max(0,w-j-3)]

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

        dp[i][j]=(dp[i][j]+dp[i-1][j]*(p[w-1]-t-u))%(10**9+7)

print((dp[-1][k-1]))
h, w, k = list(map(int, input().split()))
p = [sum(("11" in str(bin(j))) ^ 1 for j in range(1 << i)) for i in range(8)]
d = [w * [0] for _ in [0] * -~h]
d[0][0] = 1
for i in range(h):
    b = d[i]
    for j in range(w):
        t = u = D = 0
        if j:
            t = p[max(0, j - 2)] * p[max(0, w - j - 2)]
            D = b[j - 1] * t
        if j < w - 1:
            u = p[max(0, j - 1)] * p[max(0, w - j - 3)]
            D += b[j + 1] * u
        d[i + 1][j] = (b[j] * (p[w - 1] - t - u) + D) % (10**9 + 7)
print((d[-1][k - 1]))

h, w, k = list(map(int, input().split()))
p = [sum(("11" in str(bin(j))) ^ 1 for j in range(1 << i)) for i in range(8)]
dp = [w * [0] for _ in [0] * -~h]
dp[0][0] = 1
for i in range(1, h + 1):
    for j in range(w):
        t = u = 0
        if j:
            t = p[max(0, j - 2)] * p[max(0, w - j - 2)]
            dp[i][j] += dp[i - 1][j - 1] * t
        if j < w - 1:
            u = p[max(0, j - 1)] * p[max(0, w - j - 3)]
            dp[i][j] += dp[i - 1][j + 1] * u
        dp[i][j] = (dp[i][j] + dp[i - 1][j] * (p[w - 1] - t - u)) % (10**9 + 7)
print((dp[-1][k - 1]))

-d = [w * [0] for _ in [0] * -~h] -d[0][0] = 1 -for i in range(h): -    b = d[i] +dp = [w * [0] for _ in [0] * -~h] +dp[0][0] = 1 +for i in range(1, h + 1): -        t = u = D = 0 +        t = u = 0 -            D = b[j - 1] * t +            dp[i][j] += dp[i - 1][j - 1] * t -            D += b[j + 1] * u -        d[i + 1][j] = (b[j] * (p[w - 1] - t - u) + D) % (10**9 + 7) -print((d[-1][k - 1])) +            dp[i][j] += dp[i - 1][j + 1] * u +        dp[i][j] = (dp[i][j] + dp[i - 1][j] * (p[w - 1] - t - u)) % (10**9 + 7) +print((dp[-1][k - 1]))