h1, m1, s1 = map(int, input().split(":")) h2, m2, s2 = map(int, input().split(":")) if h1 == h2 and m1 == m2 and s1 == s2 : print("24:00:00") else : t1 = h1*3600 + m1*60 + s1 t2 = h2*3600 + m2*60 + s2 diff = t2 - t1 if t2 > t1 else t2 - t1 + 24 * 3600 h = diff // 3600 m = (diff % 3600) // 60 s = diff % 60 print(f"{h:02d}:{m:02d}:{s:02d}")