def ascan; gets.split.map(&:to_i);end h,m,s = gets.chomp.split h = h.to_i m = m.to_i s = s[3..-1].to_f+1e-3 t = Time.utc(1, 1, 1, h, m) t -= 9*60*60 t += s*60*60 puts t.strftime("%H:%M")