object Main extends App {
    val in = io.Source.stdin.getLines.map(_.split(" ").map(_.toInt)).toSeq.init
    in.foreach(d =>
        val x = 7200-d(0)*3600-d(1)*60-d(2)
        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))
    )
}