object Main extends App {
    val input = io.StdIn.readLine().split(' ')
    var a = input(0).toLong
    var b = input(1).toLong
    val k = input(2).toInt

    for(i <- 1 to k){
        if(a >= 1) a -= 1
        else if(b >= 1) b -= 1
        println(a)
        println(b)
    }

    println(s"$a $b")
}