loop do
  h,m,s = gets.split.map(&:to_i)
  break if [h,m,s].all?{|i| i==-1}
  sec = Time.new(1,1,1,2,0,0) - Time.new(1,1,1,h,m,s)
  t = Time.new(1,1,1,sec/3600,(sec%3600)/60,sec%60)
  puts t.strftime("%H:%M:%S")
  t += sec*2
  puts t.strftime("%H:%M:%S")
end