import qualified Data.Map as Map
g=1000000007

f::[Int]->Int->Int
f [] p1=p1
f (_:[]) p1=p1
f (x:y:zs) p1
    |x+1==y=((f zs p1) + (f (y:zs) p1)) `mod` g
    |otherwise=f (y:zs) p1

f2::Int->Int->[Int]->Map.Map Int Int->Map.Map Int Int
f2 0 _ _ ms=ms
f2 h w xs ms=let ls=Map.toList ms
                 ts=[(e1+1,f (filter (\e->(not (e==e1) && not (e==e1+1))) xs) e2)|(e1,e2)<-ls,e1+1<=w]
                 ts2=[(e1,f (filter (\e->(not (e==e1))) xs) e2)|(e1,e2)<-ls]
                 ts3=[(e1-1,f (filter (\e->(not (e==e1) && not (e==e1-1))) xs) e2)|(e1,e2)<-ls,e1-1>0]
             in f2 (h-1) w xs (Map.fromListWith (+) (ts++ts2++ts3))

main = do
       e1<-getLine
       let (h:w:k:[])=map read (words e1)::[Int]
           xs=[1..w]
           ms=Map.fromList [(1,1)]
           ans=Map.toList $ f2 h w xs ms
       print $ (snd (ans!!(k-1))) `mod` g