object Main extends App {
    val in = io.Source.stdin.getLines.map(_.trim.split(" ").map(_.toInt)).toSeq.init
    for (Array(h, m, s) <- in) {
        val x = 7200-h*3600-m*60-s
        println("%02d:%02d:%02d".format(x/3600, x/60%60, x%60))
        println("%02d:%02d:%02d".format(x/1200, x/20%60, x*3%60))
    }
}