fun main(args: Array<String>) {
    val (h, w, k) = readLine()!!.split(" ").map { it.toInt() }
    if(w==1){
        println(1)
        return
    }

    val patterns = (0 until 1.shl(w-1)).filter{ bit -> (0..8).all{ (bit shr it) and 3 != 3 } }
    val rowPatterns=IntArray(w-1)
    patterns.forEach {
        for (i in 0 until w-1){
            rowPatterns[i]+= it shr i and 1
        }
    }

    val dp=LongArray(w)
    dp[0]=1

    repeat(h){
        val nextDp=LongArray(w)
        nextDp[0] = dp[0]*(patterns.size-rowPatterns[0]) + dp[1]*rowPatterns[0]
        nextDp[w-1] = dp[w-1]*(patterns.size-rowPatterns[w-2]) + dp[w-2]*rowPatterns[w-2]
        for(i in 1..w-2){
            nextDp[i] = dp[i]*(patterns.size-rowPatterns[i-1]-rowPatterns[i]) +
                        dp[i-1]*rowPatterns[i-1] +
                        dp[i+1]*rowPatterns[i]
        }
        for(i in 0..w-1){
            dp[i] = nextDp[i] % 1000000007L
        }
    }

    println(dp[k-1])
 }