import java.util.Scanner

object Main extends App {

  def onelineFunc(left:Boolean,rest:Int):Long = {
    if (rest <= 0) {
      1
    } else {
      if (left) {
        onelineFunc(false,rest-1)
      } else {
        onelineFunc(true,rest-1) + onelineFunc(false,rest -1)
      }
    }
  }

  val scanner = new Scanner(System.in)
  val h = scanner.nextInt()
  val w = scanner.nextInt()
  val k = scanner.nextInt()

  val oneline = onelineFunc(false,w)
  val oneblock = oneline * w

  def abs(x:Int) = {
    if (x>=0) {
      x
    } else {
      -x
    }
  }

  def reachablePatterns(from:Int,to:Int,ht:Int):Long = {
    if (from<0 || from >=k){
      0
    }else if (ht==1){
      if (abs(to-from)==1 || abs(to-from) == 0) {
        1
      } else {
        0
      }
    } else {
      reachablePatterns(from-1,to,ht-1)+reachablePatterns(from,to,ht-1)+reachablePatterns(from+1,to,ht-1)
    }
  }

  val blocknum = h/w
  var current:Long = 1
  (0 until blocknum).foreach(_=>{
    current = current * oneblock
    if (current>1000000007) {
      current = current % 1000000007
    }
  })
  println(current)
  val lastblock = (0 until w).map(i=>reachablePatterns(i,k-1,h%w)).sum
  println(lastblock)
  val result = if (h>w) {
    current * lastblock / w
  } else {
    current * lastblock
  }
  println(result)
}