import scala.io.StdIn._

object Main extends App {
  def m(s: String): Int = {
    val input = s.split(" ").toList
    val x = input.head.toDouble
    val d = input(1).toDouble
    val n = input(2).toInt
    val MOD = 10000003
    //------------------------
    val v = x / d
    val l = (0 until n).map(v + _).toList
    var ans = l.head
    for (i <- l.tail) {
      ans *= i
      if (ans > MOD) ans = ans % MOD
    }
    val res = ans * (math.pow(d, n) % MOD)
    res.toInt % MOD
  }

  for (_ <- 1 to readInt())
    println(m(readLine()))
}