George woke up and saw the current time s on the digital clock. Besides, George knows that he has slept for time t. 

Help George! Write a program that will, given time s and t, determine the time p when George went to bed. Note that George could have gone to bed yesterday relatively to the current time (see the second test sample). 


-----Input-----

The first line contains current time s as a string in the format "hh:mm". The second line contains time t in the format "hh:mm" — the duration of George's sleep. It is guaranteed that the input contains the correct time in the 24-hour format, that is, 00 ≤ hh ≤ 23, 00 ≤ mm ≤ 59.


-----Output-----

In the single line print time p — the time George went to bed in the format similar to the format of the time in the input.


-----Examples-----
Input
05:50
05:44

Output
00:06

Input
00:00
01:00

Output
23:00

Input
00:01
00:00

Output
00:01



-----Note-----

In the first sample George went to bed at "00:06". Note that you should print the time only in the format "00:06". That's why answers "0:06", "00:6" and others will be considered incorrect. 

In the second sample, George went to bed yesterday.

In the third sample, George didn't do to bed at all.

Difficulty: EASY
Tags: Implementation

Starter code:

Solutions:
bangun = input().split(':')
lama_tidur = input().split(':')
menit = int(bangun[1]) - int(lama_tidur[1])
jam = int(bangun[0]) - int(lama_tidur[0])
if menit < 0:
	menit += 60
	jam -= 1
if jam < 0:
	jam += 24
A = str(menit)
B = str(jam)
if len(A) < 2:
	A = '0' + A
if len(B) < 2:
	B = '0' + B
print(B + ':' + A)


q = input()
w = input()
q = q.split(':')
w = w.split(':')
a = int(q[0])
b = int(w[0])
aa = int(q[1])
bb = int(w[1])
if aa < bb:
	aa = aa + 60
	a = a - 1
rr = aa - bb
if a < b:
	a = a + 24
gg = a - b
if gg < 10:
	gg = '0' + str(gg)
if rr < 10:
	rr = '0' + str(rr)
print(str(gg) + ':' + str(rr))


(woke_hr, woke_min) = map(int, input().split(':'))
(dur_hr, dur_min) = map(int, input().split(':'))
(st_sleep_hr, st_sleep_min) = (0, 0)
if woke_min < dur_min:
	st_sleep_min = 60 + woke_min - dur_min
	dur_hr += 1
else:
	st_sleep_min = woke_min - dur_min
if st_sleep_min in range(0, 10):
	st_sleep_min = '0' + str(st_sleep_min)
else:
	st_sleep_min = str(st_sleep_min)
st_sleep_hr = (woke_hr - dur_hr) % 24
if st_sleep_hr in range(0, 10):
	st_sleep_hr = '0' + str(st_sleep_hr)
else:
	st_sleep_hr = str(st_sleep_hr)
print(''.join([st_sleep_hr, ':', st_sleep_min]))


from datetime import datetime
s = input()
t = input()
t1 = datetime.strptime(s, '%H:%M')
t2 = datetime.strptime(t, '%H:%M')
m_diff = t1.minute - t2.minute
h_diff = h_diff = t1.hour - t2.hour
if m_diff >= 0:
	if h_diff < 0:
		h_diff = 24 + h_diff
elif m_diff < 0:
	m_diff = 60 + m_diff
	h_diff -= 1
	if h_diff < 0:
		h_diff = 24 + h_diff
if h_diff < 10:
	s = '0' + str(h_diff)
	if m_diff < 10:
		s = s + ':' + '0' + str(m_diff)
	else:
		s = s + ':' + str(m_diff)
else:
	s = str(h_diff)
	if m_diff < 10:
		s = s + ':' + '0' + str(m_diff)
	else:
		s = s + ':' + str(m_diff)
print(s)


(a, b) = map(int, input().split(':'))
(c, d) = map(int, input().split(':'))
e = a * 60 + b
f = c * 60 + d
j = e - f
if j < 0:
	j = 24 * 60 + j
j1 = str(j // 60)
j2 = str(j % 60)
if len(j1) == 1:
	j1 = '0' + j1
if len(j2) == 1:
	j2 = '0' + j2
res = j1 + ':' + j2
print(res)


s = input().strip()
p = input().strip()
ans = int(s[:2]) * 60 + int(s[3:]) - int(p[:2]) * 60 - int(p[3:])
ans = ans % 1440
t = ('0' if ans // 60 < 10 else '') + str(ans // 60) + ':' + ('0' if ans % 60 < 10 else '') + str(ans % 60)
print(t)


(h1, m1) = list(map(int, input().split(':')))
(h2, m2) = list(map(int, input().split(':')))
if m2 > m1:
	m1 += 60
	h1 -= 1
h1 -= h2
m1 -= m2
if h1 < 0:
	h1 += 24
h = ''
m = ''
if h1 < 10:
	h = '0'
h += str(h1)
if m1 < 10:
	m = '0'
m += str(m1)
print(h, m, sep=':', end='\n')


(a, b) = map(int, input().split(':'))
(c, d) = map(int, input().split(':'))
e = b - d
if e < 0:
	e += 60
	c += 1
f = (a - c + 24) % 24
print('%02i:%02i' % (f, e))


S = input().split(':')
T = input().split(':')
c = 0
if int(S[1][1]) - int(T[1][1]) < 0:
	R = 10 + int(S[1][1]) - int(T[1][1])
	c = 1
else:
	R = int(S[1][1]) - int(T[1][1])
if c == 1:
	Y = int(S[1][0]) - 1
	if Y - int(T[1][0]) < 0:
		R1 = 6 + Y - int(T[1][0])
		c = 1
	else:
		R1 = Y - int(T[1][0])
		c = 0
else:
	Y = int(S[1][0])
	if Y - int(T[1][0]) < 0:
		R1 = 6 + Y - int(T[1][0])
		c = 1
	else:
		R1 = Y - int(T[1][0])
		c = 0
if S[0][0] == '0':
	A = int(S[0][1])
else:
	A = int(S[0])
if T[0][0] == '0':
	B = int(T[0][1])
else:
	B = int(T[0])
if c == 1:
	A = A - 1
if A - B < 0:
	R2 = 24 + A - B
else:
	R2 = A - B
if len(str(R2)) == 1:
	Z = '0' + str(R2)
	R2 = Z
print(str(R2) + ':' + str(R1) + str(R))


from sys import stdin
from datetime import datetime, timedelta

def main():
	s = stdin.readline().strip()
	t = stdin.readline().strip()
	s = datetime.strptime(s, '%H:%M')
	t = datetime.strptime(t, '%H:%M')
	t = timedelta(hours=t.hour, minutes=t.minute)
	p = s - t
	print('{:02}:{:02}'.format(p.hour, p.minute))

def __starting_point():
	main()
__starting_point()


(h0, m0) = str(input()).split(':')
(h1, m1) = str(input()).split(':')
h = int(h0) - int(h1)
m = int(m0) - int(m1)
if m < 0:
	m += 60
	h -= 1
if h < 0:
	h += 24
print('%02d' % h + ':' + '%02d' % m)


s1 = input()
s2 = input()
hours = int(s2.split(':')[0])
minutes = int(s2.split(':')[1])
curr_hour = int(s1.split(':')[0])
curr_min = int(s1.split(':')[1])
ans_min = 0
ans_hour = 0
if curr_min < minutes:
	ans_min = curr_min - minutes + 60
	ans_hour = -1
else:
	ans_min = curr_min - minutes
if curr_hour < hours:
	ans_hour = ans_hour + curr_hour - hours + 24
else:
	ans_hour = ans_hour + curr_hour - hours
ans = ''
if ans_hour < 0:
	ans_hour = ans_hour + 24
if ans_hour <= 9:
	ans = ans + '0'
	ans = ans + str(ans_hour)
else:
	ans = ans + str(ans_hour)
ans = ans + ':'
if ans_min <= 9:
	ans = ans + '0'
	ans = ans + str(ans_min)
else:
	ans = ans + str(ans_min)
print(ans)


fir = input().split(':')
sec = input().split(':')
ah = int(fir[0])
am = int(fir[1])
bh = int(sec[0])
bm = int(sec[1])
if ah < bh or (ah == bh and am < bm):
	ah = ah + 24
ah = ah - bh
am = am - bm
if am < 0:
	ah = ah - -am / 60
	am = 60 + am
print('%02d:%02d' % (ah, am))


s = input()
t = list(map(int, s.split(':')))
(h1, m1) = (t[0], t[1])
s = input()
t = list(map(int, s.split(':')))
(h2, m2) = (t[0], t[1])
h = h1 - h2
m = m1 - m2
if h < 0 and m < 0:
	h = 24 + h - 1
	m = 60 + m
elif h < 0:
	h = 24 + h
elif m < 0:
	m = 60 + m
	if h > 0:
		h -= 1
	elif h - 1 < 0:
		h = 23
	if h > 23:
		h = 0
print('%02d:%02d' % (h, m))


(jam, menit) = map(int, input().split(':'))
(lamajam, lamamenit) = map(int, input().split(':'))
a = jam - lamajam
b = menit - lamamenit
if b < 0:
	a -= 1
a = a % 24
b = b % 60
if a < 10:
	a = '0' + str(a)
if b < 10:
	b = '0' + str(b)
print(str(a) + ':' + str(b))


n = input()
a = n.split(':')
m = input()
b = m.split(':')
z = []
c = int(a[0]) - int(b[0])
d = int(a[1]) - int(b[1])
if d < 0:
	d += 60
	c -= 1
if c < 0:
	c += 24
print(str(c).zfill(2) + ':' + str(d).zfill(2))


def minutes(x, y):
	return x * 60 + y
(a, b) = map(int, input().split(':'))
(c, d) = map(int, input().split(':'))
delta_time = minutes(a, b) - minutes(c, d)
if delta_time < 0:
	delta_time += 24 * 60
print('%02d:%02d' % (delta_time // 60, delta_time % 60))


s = list(map(int, input().split(':')))
t = list(map(int, input().split(':')))
s[0] -= t[0]
s[1] -= t[1]
if s[1] < 0:
	s[1] += 60
	s[0] -= 1
if s[0] < 0:
	s[0] += 24
s = list(map(str, s))
s[0] = s[0].zfill(2)
s[1] = s[1].zfill(2)
print(':'.join(s))


s = str(input())
t = str(input())
c = int(s[0:2]) * 60 + int(s[3:5]) - int(t[0:2]) * 60 - int(t[3:5])
if c < 0:
	c += 1440
hours = c // 60
minutes = c % 60
if hours < 10:
	p = '0' + str(hours) + ':'
else:
	p = str(hours) + ':'
if minutes < 10:
	p = p + '0' + str(minutes)
else:
	p = p + str(minutes)
print(p)


import sys
import math
import heapq
import random
import collections
import datetime

def main():
	t1 = list(map(int, input().strip().split(':')))
	t2 = list(map(int, input().strip().split(':')))
	t1_ = datetime.timedelta(hours=t1[0], minutes=t1[1])
	t2_ = datetime.timedelta(hours=t2[0], minutes=t2[1])
	t3_ = t1_ - t2_
	s = str(t3_)
	if len(s[-8:-3]) == 4:
		print('0' + s[-8:-3])
	elif len(s[-8:-3]) == 5 and s[-8] == ' ':
		print('0' + s[-7:-3])
	else:
		print(s[-8:-3])

def __starting_point():
	main()
__starting_point()


(a, b) = map(int, input().split(':'))
(c, d) = map(int, input().split(':'))
y = b - d + 60 * (b < d)
if b < d:
	x = a - 1 - c + 24 * (a - 1 < c)
else:
	x = a - c + 24 * (a < c)
print(x if x >= 10 else '0' + str(x), end=':')
print(y if y >= 10 else '0' + str(y))


import sys
import math
import itertools
import collections

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def wr(arr):
	return ''.join(map(str, arr))

def revn(n):
	return str(n)[::-1]

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base=3):
	newnumber = ''
	while number > 0:
		newnumber = str(number % base) + newnumber
		number //= base
	return newnumber

def z(n):
	if n < 10:
		return '0' + str(n)
	else:
		return str(n)
(hh, mm) = map(int, input().split(':'))
(gh, gm) = map(int, input().split(':'))
ans = gh * 60 + gm
while ans > 0:
	if mm == 0:
		if hh == 0:
			hh = 23
		else:
			hh -= 1
		mm = 59
	else:
		mm -= 1
	ans -= 1
print(z(hh) + ':' + z(mm))


(h1, m1) = map(int, input().split(':'))
m1 += h1 * 60
(h2, m2) = map(int, input().split(':'))
m2 += h2 * 60
m2 = m1 - m2
m2 %= 1440
print('%02d:%02d' % (m2 // 60, m2 % 60))


time = input()
duration = input()
time_hour = time[0:2]
time_minute = time[-2:]
duration_hour = duration[0:2]
duration_minute = duration[-2:]
if time_hour[0] == 0:
	time_hour.pop(0)
if time_minute[0] == 0:
	time_minute.pop(0)
if duration_hour[0] == 0:
	duration_hour.pop(0)
if duration_minute[0] == 0:
	duration_minute.pop(0)
g2b_hour = int(time_hour) - int(duration_hour)
g2b_hour = str(g2b_hour)
if int(g2b_hour) < 0:
	g2b_hour = int(g2b_hour)
	g2b_hour += 24
	g2b_hour = str(g2b_hour)
if 0 <= int(g2b_hour) < 10:
	g2b_hour = list(str(g2b_hour))
	g2b_hour.insert(0, '0')
	g2b_hour = ''.join(g2b_hour)
g2b_minute = int(time_minute) - int(duration_minute)
g2b_minute = str(g2b_minute)
if int(g2b_minute) < 0:
	g2b_minute = int(g2b_minute)
	g2b_minute += 60
	g2b_hour = int(g2b_hour)
	g2b_hour += -1
	if g2b_hour < 0:
		g2b_hour += 24
	if 0 <= int(g2b_hour) < 10:
		g2b_hour = list(str(g2b_hour))
		g2b_hour.insert(0, '0')
		g2b_hour = ''.join(g2b_hour)
		g2b_hour = str(g2b_hour)
if 0 <= int(g2b_minute) < 10:
	g2b_minute = list(str(g2b_minute))
	g2b_minute.insert(0, '0')
	g2b_minute = ''.join(g2b_minute)
print(str(g2b_hour) + ':' + str(g2b_minute))


def printtime(a):
	h = a // 60
	m = a % 60
	if h < 10:
		h = '0' + str(h)
	if m < 10:
		m = '0' + str(m)
	print(h, m, sep=':')
(h1, m1) = (int(i) for i in input().split(':'))
(h2, m2) = (int(i) for i in input().split(':'))
t1 = h1 * 60 + m1
t2 = h2 * 60 + m2
if t1 >= t2:
	printtime(t1 - t2)
else:
	printtime(24 * 60 - t2 + t1)


s1 = input()
s2 = input()
(h1, m1) = s1.split(':')
(h2, m2) = s2.split(':')
m = int(m1) - int(m2)
h = int(h1) - int(h2) - 1 * (m < 0)
print(str(h % 24).zfill(2), str(m % 60).zfill(2), sep=':')


def conv(s):
	h = str(s // 60)
	m = str(s % 60)
	if len(h) < 2:
		h = '0' + h
	if len(m) < 2:
		m = '0' + m
	return h + ':' + m
s = list(map(int, input().split(':')))
t = list(map(int, input().split(':')))
s = s[0] * 60 + s[1]
t = t[0] * 60 + t[1]
p = s - t
if p < 0:
	p += 24 * 60
print(conv(p))


wake = input().strip().split(':')
time = input().strip().split(':')
(wake[0], wake[1]) = (int(wake[0]), int(wake[1]))
(time[0], time[1]) = (int(time[0]), int(time[1]))
sleep = [-1, -1]
if wake[1] >= time[1]:
	sleep[1] = wake[1] - time[1]
	if wake[0] >= time[0]:
		sleep[0] = wake[0] - time[0]
	else:
		sleep[0] = 24 - (time[0] - wake[0])
else:
	sleep[1] = 60 - (time[1] - wake[1])
	if wake[0] > 0:
		wake[0] = wake[0] - 1
	else:
		wake[0] = 23
	if wake[0] >= time[0]:
		sleep[0] = wake[0] - time[0]
	else:
		sleep[0] = 24 - (time[0] - wake[0])
print('{0:02}'.format(sleep[0]) + ':' + '{0:02}'.format(sleep[1]))


s = list(map(int, input().split(':')))
e = list(map(int, input().split(':')))
(hh, mm) = (0, 0)
if s[0] - e[0] < 0:
	hh = 24 - abs(s[0] - e[0])
else:
	hh = s[0] - e[0]
if s[1] - e[1] < 0:
	if hh - 1 < 0:
		hh = 23
	else:
		hh -= 1
	mm = 60 - abs(s[1] - e[1])
else:
	mm = s[1] - e[1]
mm = str(mm)
hh = str(hh)
if len(hh) == 1:
	hh = '0' + hh
if len(mm) == 1:
	mm = '0' + mm
print(f'{hh}:{mm}')


curr = input()
slept = input()
(hc, mc) = (int(curr.split(':')[0]), int(curr.split(':')[1]))
(hs, ms) = (int(slept.split(':')[0]), int(slept.split(':')[1]))
if hc == 0:
	hc = 24
if hs == 0:
	hs = 24
h = hc - hs
m = mc - ms
if m < 0:
	m += 60
	h -= 1
if h < 0:
	h += 24
print('{:02d}'.format(h) + ':' + '{:02d}'.format(m))


(s, t) = (input(), input())
(sh, sm) = (int(s[:2]), int(s[3:]))
(th, tm) = (int(t[:2]), int(t[3:]))
pm = (sh * 60 + sm - (th * 60 + tm) + 24 * 60) % (24 * 60)
(ph, pm) = (pm // 60, pm % 60)
print(ph // 10, ph % 10, ':', pm // 10, pm % 10, sep='')


(sh, sm) = map(int, input().split(':'))
(ts, tm) = map(int, input().split(':'))
rm = sm - tm
if rm < 0:
	rm += 60
	ts += 1
rh = (sh - ts + 24) % 24
print('%02d:%02d' % (rh, rm))


(h1, m1) = map(int, input().split(':'))
(h2, m2) = map(int, input().split(':'))
if m1 < m2:
	m1 += 60
	h1 -= 1
if h1 < h2:
	h1 += 24
(r1, r2) = (str(h1 - h2), str(m1 - m2))
print('0' * (2 - len(r1)) + r1 + ':' + '0' * (2 - len(r2)) + r2)


a = input()
b = input()
h1 = int(a[:2])
m1 = int(a[3:])
h2 = int(b[:2])
m2 = int(b[3:])
answ1 = str((h1 - h2 - int(m1 < m2)) % 24)
if len(answ1) <= 1:
	answ1 = '0' + answ1
answ2 = str((m1 - m2) % 60)
if len(answ2) <= 1:
	answ2 = '0' + answ2
print(answ1 + ':' + answ2)


s = input()
t = input()
hs = int(s[:2])
ms = int(s[3:5])
ht = int(t[:2])
mt = int(t[3:5])
hr = 0
mr = 0
if hs < ht:
	hr = 24 - abs(hs - ht)
else:
	hr = hs - ht
if ms < mt:
	mr = 60 - abs(ms - mt)
	hr = hr - 1 if hr > 0 else 23
else:
	mr = ms - mt
print(str(hr).zfill(2) + ':' + str(mr).zfill(2))


t = list(map(lambda x: int(x), input().split(':')))
s = list(map(lambda x: int(x), input().split(':')))
if t[0] == 0:
	t[0] = 24
if s[0] >= 24:
	s[0] = s[0] - 24
if t[1] < s[1]:
	t[0] = t[0] - 1
	t[1] = t[1] + 60
if t[0] < s[0]:
	t[0] = t[0] + 24
if t[0] - s[0] < 10:
	res1 = '0' + str(t[0] - s[0])
else:
	res1 = str(t[0] - s[0])
if t[1] - s[1] < 10:
	res2 = '0' + str(t[1] - s[1])
else:
	res2 = str(t[1] - s[1])
if res1 == '24':
	res1 = '00'
print(res1 + ':' + res2)


a = input().split(':')
b = input().split(':')
c1 = int(a[0]) - int(b[0])
c2 = int(a[1]) - int(b[1])
if c2 < 0:
	c2 += 60
	c1 -= 1
if c1 < 0:
	c1 += 24
c1 = str(c1)
c2 = str(c2)
if len(c1) == 1:
	c1 = '0' + c1
if len(c2) == 1:
	c2 = '0' + c2
print(c1 + ':' + c2)


(s_hh, s_mm) = map(int, input().split(':'))
(t_hh, t_mm) = map(int, input().split(':'))
hh = list(range(0, 24))
mm = list(range(0, 60))
if s_mm - t_mm < 0:
	t_hh += 1
print(str(hh[s_hh - t_hh]).zfill(2) + ':' + str(mm[s_mm - t_mm]).zfill(2))


(h, m) = list(map(int, input().split(':')))
(t_h, t_m) = list(map(int, input().split(':')))
if m >= t_m:
	m -= t_m
else:
	h = (h - 1) % 24
	m = m + 60 - t_m
if h >= t_h:
	h -= t_h
else:
	h = (h - t_h) % 24
print('{0:02}'.format(h) + ':' + '{0:02}'.format(m))


(hw, mw) = map(int, input().split(':'))
(hs, ms) = map(int, input().split(':'))
w = hw * 60 + mw
s = hs * 60 + ms
b = (w - s) % 1440
hb = int(b / 60)
mb = int(b % 60)
rhb = str(100 + hb)
rmb = str(100 + mb)
print(rhb[-2:], end=':')
print(rmb[-2:])


(s, t) = (list(map(int, input().split(':'))), list(map(int, input().split(':'))))
(a, b, c, d) = (s[0], s[1], t[0], t[1])
x = []
if b >= d:
	x.append(str(b - d).zfill(2))
else:
	x.append(str((b - d) % 60).zfill(2))
	a -= 1
x.insert(0, str((a - c) % 24).zfill(2))
print(':'.join(x))


s = input()
t = input()
x = int(t[:2]) * 60 + int(t[3:])
y = int(s[:2]) * 60 + int(s[3:])
if y - x < 0:
	z = 1440 - (x - y)
	a = str(z // 60)
	b = str(z % 60)
	if len(a) < 2:
		a = '0' + a
	if len(b) < 2:
		b = '0' + b
	print(a + ':' + b)
else:
	z = y - x
	a = str(z // 60)
	b = str(z % 60)
	if len(a) < 2:
		a = '0' + a
	if len(b) < 2:
		b = '0' + b
	print(a + ':' + b)


(shh, smm) = map(int, input().split(':'))
(thh, tmm) = map(int, input().split(':'))
a = shh - thh
b = smm - tmm
if b < 0:
	b += 60
	a -= 1
if a < 0:
	a += 24
print(str('{:02d}'.format(a)) + ':' + str('{:02d}'.format(b)))


a = input()
b = input()
c = a.split(':')
d = b.split(':')
currenttime1 = int(c[0])
if int(c[0][0]) == 0:
	currenttime1 = int(c[0][1])
currenttime2 = int(c[1])
if int(c[-1][0]) == 0:
	currenttime2 = int(c[1][1])
duration1 = int(d[0])
if int(d[0][0]) == 0:
	duration1 = int(d[0][1])
duration2 = int(d[1])
if int(d[-1][0]) == 0:
	duration = int(d[1][1])
time2 = currenttime2 - duration2
if currenttime2 < duration2:
	time2 = 60 - (duration2 - currenttime2)
	duration1 = duration1 + 1
time = currenttime1 - duration1
if currenttime1 < duration1:
	time = 24 - (duration1 - currenttime1)
if time <= 9:
	time = '0' + str(time)
if time2 <= 9:
	time2 = '0' + str(time2)
print(str(time) + ':' + str(time2))


(a, b) = map(int, input().split(':'))
(c, d) = map(int, input().split(':'))
t1 = a * 60 + b
t2 = c * 60 + d
if t1 >= t2:
	t3 = t1 - t2
else:
	t3 = 24 * 60 + t1 - t2
print(f'%02d:%02d' % (t3 // 60, t3 % 60))


s = [int(x) for x in input().split(':')]
d = [int(x) for x in input().split(':')]
if s[1] < d[1]:
	s[0] -= 1
	s[1] += 60
if s[0] < d[0]:
	s[0] += 24
if s[0] - d[0] < 10:
	print('0', end='')
print('{0}:'.format(s[0] - d[0]), end='')
if s[1] - d[1] < 10:
	print('0', end='')
print('{0}'.format(s[1] - d[1]), end='')


s = input()
t = input()
minutes = int(s[:2]) * 60 + int(s[3:]) - (int(t[:2]) * 60 + int(t[3:]))
result = minutes if minutes >= 0 else 1440 + minutes
print('{:02}:{:02}'.format(result // 60, result % 60))


s = input().split(':')
t = input().split(':')
answer = []
hourWakeUp = int(s[0])
minuteWakeUp = int(s[1])
hourSleep = int(t[0])
minuteSleep = int(t[1])
if minuteWakeUp < minuteSleep:
	minuteWakeUp = minuteWakeUp + 60
	hourWakeUp -= 1
if hourWakeUp < hourSleep:
	hourWakeUp = hourWakeUp + 24
hourAnswer = str(hourWakeUp - hourSleep).zfill(2)
minuteAnswer = str(minuteWakeUp - minuteSleep).zfill(2)
answer.append(hourAnswer)
answer.append(minuteAnswer)
ans = ':'.join(answer)
print(ans)


x = input()
x = x.replace(':', ' ')
x = x.split()
y = input()
y = y.replace(':', ' ')
y = y.split()
a = int(x[0]) - int(y[0])
b = int(x[1]) - int(y[1])
if b < 0:
	a = a - 1
	b = 60 + b
if a < 0:
	a = 24 + a
f = 0
while f < 10:
	if a == f:
		a = '0' + str(a)
	if b == f:
		b = '0' + str(b)
	f = f + 1
print(str(a) + ':' + str(b))


a = input()
b = input()
p = int(a[0:2]) - int(b[0:2])
m = int(a[3:]) - int(b[3:])
if m < 0:
	m = 60 + m
	p -= 1
if p < 0:
	p = 24 + p
if len(str(p)) == 1:
	if p == 0:
		p = str(p) + '0'
	else:
		p = '0' + str(p)
if len(str(m)) == 1:
	if m == 0:
		m = str(m) + '0'
	else:
		m = '0' + str(m)
print(str(p) + ':' + str(m))


(h1, m1) = map(int, input().split(':'))
(h2, m2) = map(int, input().split(':'))
h1 -= h2
m1 -= m2
if m1 < 0:
	m1 += 60
	h1 -= 1
if h1 < 0:
	h1 += 24
print('{:02}:{:02}'.format(h1, m1))


(a, b) = list(map(int, input().split(':')))
(c, d) = list(map(int, input().split(':')))
t = a * 60 + b - c * 60 - d
if t < 0:
	t += 60 * 24
(a, b) = (t // 60, t % 60)
print(str(a // 10) + str(a % 10) + ':' + str(b // 10) + str(b % 10))


def ui(a):
	a = str(a)
	return '0' * (2 - len(a)) + a
(a, b) = map(int, input().split(':'))
(c, d) = map(int, input().split(':'))
t1 = 60 * a + b
t2 = 60 * c + d
if t1 >= t2:
	dt = t1 - t2
else:
	dt = 1440 - t2 + t1
print(ui(dt // 60), ':', ui(dt % 60), sep='')


a = input().split(':')
b = input().split(':')
a = int(a[0]) * 60 + int(a[1])
b = int(b[0]) * 60 + int(b[1])
a = (a + 1440 - b) % 1440
print(f'{a // 60:02d}:{a % 60:02d}')


(h1, m1) = map(int, input().split(':'))
(h2, m2) = map(int, input().split(':'))
h = h1 - h2 if h1 - h2 >= 0 else 24 + h1 - h2
m = m1 - m2 + 60 * h
h = m // 60
m %= 60
print('{:02d}:{:02d}'.format(h if h >= 0 else 24 + h, m))


(h1, m1) = map(int, input().split(':'))
(h2, m2) = map(int, input().split(':'))
h = h1 - h2
m = m1 - m2
if m < 0:
	m = 60 + m
	h -= 1
if h < 0:
	h = 24 + h
h = str(h)
m = str(m)
if len(h) == 1:
	h = '0' + h
if len(m) == 1:
	m = '0' + m
print(h + ':' + m)


s = input()
p = input()
t1 = int(s[len(s) - 2:len(s)]) - int(p[len(p) - 2:len(p)])
k = 0
if t1 < 0:
	t1 += 60
	k = 1
t0 = int(s[:2]) - int(p[:2]) - k
while t0 < 0:
	t0 += 24
t0 %= 24
res = str(t0) + ':'
if len(res) < 3:
	res = '0' + res
ss = '0' + str(t1)
ss = ss[-2:]
res += ss
print(res)


(a, b) = map(int, input().split(':'))
(c, d) = map(int, input().split(':'))
(x, y) = (0, 0)
if b >= d:
	y = b - d
else:
	a -= 1
	y = 60 - d + b
if a - c < 0:
	x = 24 + a - c
else:
	x = a - c
(x, y) = (str(x), str(y))
print('0' * abs(len(x) - 2) + x + ':' + '0' * abs(len(y) - 2) + y)


s = [int(x) for x in input().split(':')]
t = [int(x) for x in input().split(':')]
s = s[0] * 60 + s[1]
t = t[0] * 60 + t[1]
s -= t
if s < 0:
	s += 24 * 60
print('{:02d}:{:02d}'.format(s // 60, s % 60))


(a1, a2) = map(int, input().split(':'))
(b1, b2) = map(int, input().split(':'))
if a1 < b1 or (a1 == b1 and a2 < b2):
	a1 = a1 + 24
a1 = a1 - b1
a2 = a2 - b2
if a2 < 0:
	a1 -= 1
	a2 += 60
print('%02d:%02d' % (a1, a2))


z = [list(map(int, input().split(':'))) for i in range(2)]
a = 24 - z[1][0]
b = a + z[0][0]
if z[0][1] < z[1][1]:
	b -= 1
	d = 60 - (z[1][1] - z[0][1])
else:
	d = z[0][1] - z[1][1]
if b > 23:
	b = abs(b - 24)
b = '%d' % b
d = '%d' % d
if len(b) < 2:
	b = '0' + b
if len(d) < 2:
	d = '0' + d
print(b + ':' + d)


i1 = input()
i2 = input()
(hour1, minute1) = i1.split(':')
(hour2, minute2) = i2.split(':')
hour1 = int(hour1)
hour2 = int(hour2)
minute1 = int(minute1)
minute2 = int(minute2)
hour = hour1 - hour2
minute = minute1 - minute2
if len(str(hour)) == 1:
	hourstring = '0' + str(hour)
else:
	hourstring = str(hour)
if len(str(minute)) == 1:
	minutestring = '0' + str(minute)
else:
	minutestring = str(minute)
if hour > 0:
	if minute >= 0:
		print(hourstring + ':' + minutestring)
	else:
		hour = hour - 1
		minute = minute + 60
		if len(str(hour)) == 1:
			hourstring = '0' + str(hour)
		else:
			hourstring = str(hour)
		if len(str(minute)) == 1:
			minutestring = '0' + str(minute)
		else:
			minutestring = str(minute)
		print(hourstring + ':' + minutestring)
elif hour == 0:
	if minute >= 0:
		print(hourstring + ':' + minutestring)
	else:
		hour = 23
		minute = minute + 60
		if len(str(hour)) == 1:
			hourstring = '0' + str(hour)
		else:
			hourstring = str(hour)
		if len(str(minute)) == 1:
			minutestring = '0' + str(minute)
		else:
			minutestring = str(minute)
		print(hourstring + ':' + minutestring)
else:
	hour = hour + 24
	if minute >= 0:
		if len(str(hour)) == 1:
			hourstring = '0' + str(hour)
		else:
			hourstring = str(hour)
		if len(str(minute)) == 1:
			minutestring = '0' + str(minute)
		else:
			minutestring = str(minute)
		print(hourstring + ':' + minutestring)
	else:
		hour = hour - 1
		minute = minute + 60
		if len(str(hour)) == 1:
			hourstring = '0' + str(hour)
		else:
			hourstring = str(hour)
		if len(str(minute)) == 1:
			minutestring = '0' + str(minute)
		else:
			minutestring = str(minute)
		print(hourstring + ':' + minutestring)


(a, b) = map(int, input().split(':'))
(c, d) = map(int, input().split(':'))
(a1, a2) = [0] * 2
if b < d:
	a2 = b - d + 60
	if a:
		a -= 1
	else:
		a = 23
else:
	a2 = b - d
if a < c:
	a1 = a - c + 24
else:
	a1 = a - c
a1 = str(a1)
a2 = str(a2)
if len(a1) != 2:
	a1 = '0' + a1
if len(a2) != 2:
	a2 = '0' + a2
print(a1, a2, sep=':')


s = str(input())
t = str(input())
p = ''
f = int(s[:2])
v = int(t[:2])
g = int(s[3:])
h = int(t[3:])
z = True
while z:
	if f * 60 + g - (v * 60 + h) < 0:
		f = 24 + f
	n = f * 60 + g
	b = (n - (v * 60 + h)) // 60
	c = (n - (v * 60 + h)) % 60
	if b < 10:
		p += '0'
	p += str(b)
	p += ':'
	if c < 10:
		p += '0'
	p += str(c)
	print(p)
	z = False


s = input()
t = input()
hour1 = int(s[0]) * 10 + int(s[1])
min1 = int(s[3]) * 10 + int(s[4])
hour2 = int(t[0]) * 10 + int(t[1])
min2 = int(t[3]) * 10 + int(t[4])
if min1 < min2:
	min3 = min1 + 60 - min2
	if hour1 == 0:
		hour1 = 23
	else:
		hour1 -= 1
else:
	min3 = min1 - min2
if hour1 < hour2:
	hour3 = hour1 + 24 - hour2
else:
	hour3 = hour1 - hour2
if hour3 <= 9:
	print('0' + str(hour3) + ':', end='')
else:
	print(str(hour3) + ':', end='')
if min3 <= 9:
	print('0' + str(min3))
else:
	print(str(min3))


[e1, e2] = map(int, input().split(':'))
[s1, s2] = map(int, input().split(':'))
total1 = e1 * 60 + e2
total2 = s1 * 60 + s2
ans = 0
if total1 >= total2:
	ans = total1 - total2
else:
	ans = 1440 - total2 + total1
print('{:02}:{:02}'.format(int(ans / 60), int(ans % 60)))


(sh, sm) = map(int, input().split(':'))
(th, tm) = map(int, input().split(':'))
(h, m) = (0, 0)
if sm < tm:
	m = 60 + (sm - tm)
	h -= 1
else:
	m = sm - tm
if sh < th:
	h += 24 + (sh - th)
else:
	h += sh - th
if h < 0:
	h += 24
if len(str(h)) == 1:
	hh = '0' + str(h)
else:
	hh = str(h)
if len(str(m)) == 1:
	mm = '0' + str(m)
else:
	mm = str(m)
print(hh, ':', mm, sep='')


from datetime import *
a = input().split(':')
b = input().split(':')
x = datetime(1, 1, 3, int(a[0]), int(a[1]))
y = timedelta(hours=int(b[0]), minutes=int(b[1]))
z = str(x - y).split(' ')[1].split(':')
print('%s:%s' % (z[0], z[1]))


from datetime import datetime
import re
FORMAT = '%H:%M'
time1 = input()
time2 = input()
tdelta = str(datetime.strptime(time1, FORMAT) - datetime.strptime(time2, FORMAT))
print('{:0>5}'.format(re.findall('[0-9]?\\d:\\d\\d', tdelta)[0]))


s1 = input().strip()
s2 = input().strip()
h1 = int(s1[:2])
h2 = int(s2[:2])
m1 = int(s1[3:])
m2 = int(s2[3:])
h3 = h1 - h2
m3 = m1 - m2
if m3 < 0:
	m3 = 60 + m3
	h3 -= 1
if h3 < 0:
	h3 = 24 + h3
print((2 - len(str(h3))) * '0' + str(h3) + ':' + (2 - len(str(m3))) * '0' + str(m3))


s = str(input())
h = int(s.split(':')[0])
m = int(s.split(':')[1])
t = str(input())
h1 = int(t.split(':')[0])
m1 = int(t.split(':')[1])
ans_h = 0
ans_m = 0
if m >= m1:
	ans_m = m - m1
else:
	ans_m = m + 60 - m1
	if h != 0:
		h = h - 1
	else:
		h = 23
if h >= h1:
	ans_h = h - h1
else:
	ans_h = h + 24 - h1
ans_h = str(ans_h)
ans_m = str(ans_m)
if len(ans_m) == 1:
	ans_m = '0' + ans_m
if len(ans_h) == 1:
	ans_h = '0' + ans_h
print(ans_h + ':' + ans_m)


up = list(map(int, input().split(sep=':')))
time = list(map(int, input().split(sep=':')))
a = up[0] * 60 + up[1]
b = time[0] * 60 + time[1]
if a - b >= 0:
	m = (a - b) // 60
	n = (a - b) % 60
else:
	m = (24 * 60 + a - b) // 60
	n = (24 * 60 + a - b) % 60
print(str(m).zfill(2), str(n).zfill(2), sep=':')


t1 = input().split(':')
t2 = input().split(':')
x1 = int(t1[0])
x2 = int(t1[1])
x3 = int(t2[0])
x4 = int(t2[1])
if x1 >= x3 and x2 >= x4:
	mins = str(x1 - x3)
	hours = str(x2 - x4)
	if len(mins) == 1:
		mins = '0' + mins
	if len(hours) == 1:
		hours = '0' + hours
	print(mins + ':' + hours)
elif x1 <= x3 and x2 < x4:
	mins = str(x1 + 23 - x3)
	hours = str((x2 - x4 + 60) % 60)
	if len(mins) == 1:
		mins = '0' + mins
	if len(hours) == 1:
		hours = '0' + hours
	print(mins + ':' + hours)
elif x1 <= x3 and x2 >= x4:
	mins = str(x1 + 24 - x3)
	hours = str((x2 - x4) % 60)
	if len(mins) == 1:
		mins = '0' + mins
	if len(hours) == 1:
		hours = '0' + hours
	print(mins + ':' + hours)
else:
	mins = str(x1 - x3 - 1)
	hours = str((x2 - x4 + 60) % 60)
	if len(mins) == 1:
		mins = '0' + mins
	if len(hours) == 1:
		hours = '0' + hours
	print(mins + ':' + hours)


a = [int(i) for i in input().split(':')]
b = [int(i) for i in input().split(':')]
c = a[0] - b[0]
d = a[1] - b[1]
if d < 0:
	d += 60
	c -= 1
if c < 0:
	c += 24
if c < 10:
	print('0', end='')
print(c, end='')
print(':', end='')
if d < 10:
	print('0', end='')
print(d, end='')


s = input().split(':')
t = input().split(':')
start = int(s[0]) * 60 + int(s[1])
time = int(t[0]) * 60 + int(t[1])
ans = start - time
if ans < 0:
	ans = 24 * 60 + ans
hours = ans // 60
minutes = ans % 60
if hours < 10:
	print('0{}:'.format(hours), end='')
else:
	print('{}:'.format(hours), end='')
if minutes < 10:
	print('0{}'.format(minutes))
else:
	print('{}'.format(minutes))


s = input()
t1 = (10 * int(s[0]) + int(s[1])) * 60 + (10 * int(s[3]) + int(s[4]))
s = input()
t2 = (10 * int(s[0]) + int(s[1])) * 60 + (10 * int(s[3]) + int(s[4]))
t1 = (t1 - t2 + 24 * 60) % (24 * 60)
x1 = t1 // 60
x2 = t1 % 60
print(x1 // 10, end='')
print(x1 % 10, end='')
print(':', end='')
print(x2 // 10, end='')
print(x2 % 10)


(a, b) = map(str, input().split(':'))
(c, d) = map(str, input().split(':'))
a = int(a)
b = int(b)
c = int(c)
d = int(d)
f = a - c
l = b - d
if l < 0:
	l = 60 + l
	f -= 1
if f < 0:
	f = 24 + f
if f < 10:
	f = str(f)
	f = '0' + f
if l < 10:
	l = str(l)
	l = '0' + l
print(f, end=':')
print(l)


now = input()
dur = input()
a = int(now.split(':')[0])
b = int(now.split(':')[1])
c = int(dur.split(':')[0])
d = int(dur.split(':')[1])
if b >= d:
	min = b - d
if d > b:
	min = 60 + b - d
	a -= 1
if a >= c:
	hour = a - c
if c > a:
	hour = 24 + a - c
if hour < 10:
	hour = '0' + str(hour)
if min < 10:
	min = '0' + str(min)
print(str(hour) + ':' + str(min))


a = list(map(int, input().split(':')))
b = list(map(int, input().split(':')))
if a[1] < b[1]:
	a[0] -= 1
	a[1] += 60
if a[0] < b[0]:
	a[0] += 24
x = str(a[0] - b[0])
y = str(a[1] - b[1])
if len(x) == 1:
	x = '0' + x
if len(y) == 1:
	y = '0' + y
print(x + ':' + y)


s = [int(i) for i in input().split(':')]
stime = s[0] * 60 + s[1] + 24 * 60
t = [int(i) for i in input().split(':')]
ttime = t[0] * 60 + t[1]
ptime = stime - ttime
print('%02d:%02d' % (ptime // 60 % 24, ptime % 60))


t1 = input()
t2 = input()
h1 = int(t1[0:2])
h2 = int(t2[0:2])
m1 = int(t1[3:5])
m2 = int(t2[3:5])
n = (h1 - h2 if h2 - h1 <= 0 and m2 - m1 <= 0 else 24 - (h2 - h1) % 24) - (1 if m1 - m2 < 0 else 0)
u = (0 if m1 - m2 >= 0 else 60) + m1 - m2
print(('' if n > 9 else '0') + str(n) + ':' + ('' if u > 9 else '0') + str(u))


(sh, sm) = map(int, input().split(':'))
(th, tm) = map(int, input().split(':'))
l = (sh - th) % 24
r = sm - tm
if r < 0:
	l = (l - 1) % 24
	r = r % 60
print(l if l > 9 else '0' + str(l), end=':')
print(r if r > 9 else '0' + str(r))


p = input()
s = input()
(h1, m1) = map(int, p.split(':'))
(h2, m2) = map(int, s.split(':'))
h = (h1 - h2) % 24
m = (m1 - m2) % 60
if m1 < m2:
	h -= 1
h = h % 24
print('{:02d}:{:02d}'.format(h, m))


(h, m) = map(int, input().split(':'))
(t, y) = map(int, input().split(':'))
m = m - y
d = 1 if m < 0 else 0
h -= d
m = m % 60
h -= t
h = h % 24
h = str(h)
m = str(m)
if len(h) == 1:
	h = '0' + h
if len(m) == 1:
	m = '0' + m
print(h + ':' + m)


def PRINT(yy):
	a = yy // 3600
	if a == 0:
		print('00:', end='')
	elif a >= 10:
		print(str(a) + ':', end='')
	else:
		print('0' + str(a) + ':', end='')
	yy %= 3600
	a = yy // 60
	if a == 0:
		print('00')
	elif a >= 10:
		print(str(a))
	else:
		print('0' + str(a))

class MyApp:

	def __init__(self, s, t):
		self.s = s
		self.t = t

	def build(self):
		S = self.s.split(':')
		T = self.t.split(':')
		S = int(S[0]) * 3600 + int(S[1]) * 60
		T = int(T[0]) * 3600 + int(T[1]) * 60
		self.yy = S - T
		if self.yy > 0:
			PRINT(self.yy)
		elif self.yy < 0:
			self.yy = 86400 - abs(self.yy)
			PRINT(self.yy)
		else:
			print('00:00')
root = MyApp(input(), input())
root.build()


DAY_SECONDS = 86400

def get_seconds(s):
	return s[0] * 3600 + s[1] * 60

def seconds_to_time(s):
	h = s // 3600 % 24
	m = s // 60 % 60
	return '{0:02d}:{1:02d}'.format(h, m)

def solve(s, t):
	s = [int(x) for x in s.strip().split(':')]
	t = [int(x) for x in t.strip().split(':')]
	sec = get_seconds(s) - get_seconds(t)
	sec = sec if sec >= 0 else DAY_SECONDS + sec
	return seconds_to_time(sec)

def main():
	s = input()
	t = input()
	print(solve(s, t))
main()


s = list(map(int, input().split(':')))
s = (24 + s[0]) * 60 + s[1]
t = list(map(int, input().split(':')))
t = t[0] * 60 + t[1]
p = (s - t) % (24 * 60)
p = '{:02}:{:02}'.format(p // 60, p % 60)
print(p)


current = str(input())
sleepingDur = str(input())
H1 = int(current[0:2])
M1 = int(current[3:5])
H2 = int(sleepingDur[0:2])
M2 = int(sleepingDur[3:5])
sleepingHour = H1 - H2
sleepingMinute = M1 - M2
if sleepingMinute < 0:
	sleepingMinute += 60
	sleepingHour -= 1
if sleepingHour < 0:
	sleepingHour += 24
finalShit = ''
if sleepingHour < 10:
	finalShit += '0'
finalShit += str(sleepingHour) + ':'
if sleepingMinute < 10:
	finalShit += '0'
finalShit += str(sleepingMinute)
print(finalShit)


(s, r) = (input(), input())
x = int(s[:2]) - int(r[:2])
y = int(s[3:]) - int(r[3:])
if y < 0:
	y = y + 60
	x = x - 1
if x < 0:
	x = x + 24
(xx, yy) = (str(x), str(y))
if len(str(x)) == 1:
	if x == 0:
		xx = str(x) + '0'
	else:
		xx = '0' + str(x)
if len(str(y)) == 1:
	if y == 0:
		yy = str(y) + '0'
	else:
		yy = '0' + str(y)
print(xx + ':' + yy)


s = [*map(int, input().split(':'))]
t = [*map(int, input().split(':'))]
s[0] = [s[0], 24][s[0] == 0]
z = s[0] * 60 + s[1] - (t[0] * 60 + t[1])
print('{:02}:{:02}'.format(z // 60 % 24, z % 60))


def toMin(s):
	(a, b) = list(map(int, s.split(':')))
	return a * 60 + b
ct = toMin(input())
ts = toMin(input())
ans = ct - ts
if ans < 0:
	ans += 60 * 24
print('%02i:%02i' % (ans // 60, ans % 60))


wu = input()
t = input()
a = wu.split(':')
b = t.split(':')
resHr = int(a[0]) - int(b[0])
resMin = int(a[1]) - int(b[1])
if int(resMin) < 0:
	resMin = str(int(resMin) % 60)
	resHr = str(int(resHr) - 1)
else:
	resMin = str(resMin)
if int(resHr) < 0:
	resHr = str(int(resHr) % 24)
else:
	resHr = str(resHr)
if int(resHr) < 10:
	resHr = '0' + str(abs(int(resHr)))
else:
	resHr = str(resHr)
if abs(int(resMin)) < 10:
	resMin = '0' + str(abs(int(resMin)))
else:
	resMin = str(resMin)
print(resHr + ':' + resMin)


def main():
	wake = input()
	sleep = input()
	time1 = [int(sleep[:2]), int(sleep[3:])]
	time2 = [int(wake[:2]), int(wake[3:])]
	if time2[0] > time1[0]:
		total = (time2[0] - time1[0], time2[1] - time1[1])
		if total[1] < 0:
			total = (total[0] - 1, 60 + total[1])
	elif time2[0] == time1[0]:
		total = (time2[0] - time1[0], time2[1] - time1[1])
		if total[1] < 0:
			total = (23, 60 + total[1])
	elif time2[0] < time1[0]:
		total = (24 + (time2[0] - time1[0]), time2[1] - time1[1])
		if total[1] < 0:
			total = (total[0] - 1, 60 + total[1])
	output = []
	for x in range(len(total)):
		if total[x] < 10:
			output.append('0' + str(total[x]))
		else:
			output.append(str(total[x]))
	print('{}:{}'.format(output[0], output[1]))
main()


s = input()
t = input()
c = 0
if int(s[3:]) - int(t[3:]) >= 0:
	t1 = str(int(s[3:]) - int(t[3:]))
	if int(t1) < 10:
		t1 = '0' + t1
else:
	t1 = int(s[3:]) - int(t[3:])
	t1 = str(60 + t1)
	if int(t1) < 10:
		t1 = '0' + t1
	c = 1
if c == 1:
	if int(s[:2]) - int(t[:2]) - 1 >= 0:
		t2 = str(int(s[:2]) - int(t[:2]) - 1)
		if int(t2) < 10:
			t2 = '0' + t2
	else:
		t2 = int(s[:2]) - int(t[:2]) - 1
		t2 = str(24 + t2)
		if int(t2) < 10:
			t2 = '0' + t2
elif int(s[:2]) - int(t[:2]) >= 0:
	t2 = str(int(s[:2]) - int(t[:2]))
	if int(t2) < 10:
		t2 = '0' + t2
else:
	t2 = int(s[:2]) - int(t[:2])
	t2 = str(24 + t2)
	if int(t2) < 10:
		t2 = '0' + t2
ans = t2 + ':' + t1
print(ans)


(h2, m2) = list(map(int, input().split(':')))
(h_sleep, m_sleep) = list(map(int, input().split(':')))
t2 = m2 + h2 * 60
t_sleep = m_sleep + h_sleep * 60
t2 -= t_sleep
if t2 < 0:
	t2 += 60 * 24
print('0' * (2 - len(str(t2 // 60))) + str(t2 // 60) + ':' + '0' * (2 - len(str(t2 % 60))) + str(t2 % 60))


l1 = [int(x) for x in input().split(':')]
(finalh, finalm) = (l1[0], l1[1])
l2 = [int(x) for x in input().split(':')]
(diffh, diffm) = (l2[0], l2[1])
finalsum = finalh * 60 + finalm
diffsum = diffh * 60 + diffm
k = (finalsum - diffsum) % (24 * 60)
hour = int(k / 60)
minute = k % 60
if hour == 0:
	hour = '00'
elif hour < 10:
	hour = '0' + str(hour)
else:
	hour = str(hour)
if minute == 0:
	minute = '00'
elif minute < 10:
	minute = '0' + str(minute)
else:
	minute = str(minute)
print(hour + ':' + minute)


(s, t) = (input(), input())
(h1, m1, h2, m2) = (int(s[0:2]), int(s[3:5]), int(t[0:2]), int(t[3:5]))
(m, h) = (0, 0)
if m1 < m2:
	h1 -= 1
	m = 60 + m1 - m2
else:
	m = m1 - m2
if h1 < h2:
	h = 24 + (h1 - h2)
else:
	h = h1 - h2
(m, h) = (str(m), str(h))
if int(m) < 10:
	m = '0' + m
if int(h) < 10:
	h = '0' + h
print(h + ':' + m)


(hh, mm) = map(int, input().split(':'))
(hh2, mm2) = map(int, input().split(':'))
hh -= hh2
mm -= mm2
if mm < 0:
	hh -= 1
	mm += 60
if hh < 0:
	hh += 24
print('0' * (2 - len(str(hh))) + str(hh) + ':' + '0' * (2 - len(str(mm))) + str(mm))


(s, t) = map(lambda x: int(x[0]) * 60 + int(x[1]), (input().split(':') for i in "''"))
print('{:02}:{:02}'.format((24 + (s - t) // 60) % 24, (s - t) % 60))


[e1, e2] = map(int, input().split(':'))
[s1, s2] = map(int, input().split(':'))
total1 = e1 * 60 + e2
total2 = s1 * 60 + s2
ans = 0
if total1 >= total2:
	ans = total1 - total2
else:
	ans = 1440 - total2 + total1
out = ''
if int(ans / 60) < 10:
	out = out + '0' + str(int(ans / 60))
else:
	out = str(int(ans / 60))
out = out + ':'
if int(ans % 60) < 10:
	out = out + '0' + str(ans % 60)
else:
	out = out + str(ans % 60)
print(out)


a = input()
(q1, q2, q3, q4) = (int(a[0]), int(a[1]), int(a[3]), int(a[4]))
b = input()
(w1, w2, w3, w4) = (int(b[0]), int(b[1]), int(b[3]), int(b[4]))
ww = q3 * 10 + q4 + (q1 * 10 + q2) * 60
qq = w3 * 10 + w4 + (w1 * 10 + w2) * 60
s = ''
if ww == qq:
	print('00:00')
elif ww - qq > 0:
	if (ww - qq) // 60 > 9:
		d = str((ww - qq) // 60)
		s += d
	else:
		s += '0'
		d = str((ww - qq) // 60)
		s += d
	s += ':'
	if (ww - qq) % 60 > 9:
		d = str((ww - qq) % 60)
		s += d
	else:
		s += '0'
		d = str((ww - qq) % 60)
		s += d
	print(s)
else:
	if (ww - qq + 1440) // 60 > 9:
		d = str((ww - qq + 1440) // 60)
		s += d
	else:
		s += '0'
		d = str((ww - qq + 1440) // 60)
		s += d
	s += ':'
	if (ww - qq + 1440) % 60 > 9:
		d = str((ww - qq + 1440) % 60)
		s += d
	else:
		s += '0'
		d = str((ww - qq + 1440) % 60)
		s += d
	print(s)


(a, b) = map(int, input().split(':'))
(d, e) = map(int, input().split(':'))
if b - e < 0 and a - d > 0:
	r = a - d - 1
	R = 60 + b - e
elif b - e < 0 and a - d == 0:
	r = 23
	R = 60 + b - e
elif a - d < 0 and b - e >= 0:
	r = 24 + a - d
	R = b - e
elif a - d < 0 and b - e < 0:
	r = 24 + a - d - 1
	R = 60 + b - e
else:
	r = a - d
	R = b - e
r = str(r)
R = str(R)
for i in range(2 - len(r)):
	r = '0' + r
for i in range(2 - len(R)):
	R = '0' + R
print(r + ':' + R)


s = input().split(':')
a = int(s[0])
b = int(s[1])
s = input().split(':')
x = int(s[0])
y = int(s[1])
b = b - y
if b < 0:
	b = b + 60
	a -= 1
a = a - x
if a < 0:
	a = a + 24
if a < 10:
	print('0', end='')
print(a, end='')
print(':', end='')
if b < 10:
	print(0, end='')
print(b, end='')


(a, b) = map(int, input().split(':'))
(c, d) = map(int, input().split(':'))
r = a * 60 + b - c * 60 - d
if r < 0:
	r += 60 * 24
a = r // 60
b = r % 60
print(str(a // 10) + str(a % 10) + ':' + str(b // 10) + str(b % 10))


ti = input()
duration = input()
hh = int(ti[:2]) - int(duration[:2])
mm = int(ti[3:]) - int(duration[3:])
if hh < 0 and mm >= 0:
	if len(str(mm)) == 1:
		mm = '0' + str(mm)
	print(str(24 + hh) + ':' + str(mm))
elif hh >= 0 and mm >= 0:
	if len(str(mm)) == 1:
		mm = '0' + str(mm)
	if len(str(hh)) == 1:
		hh = '0' + str(hh)
	print(str(hh) + ':' + str(mm))
elif hh <= 0 and mm < 0:
	hh = 23 + hh
	mm = 60 + mm
	if len(str(mm)) == 1:
		mm = '0' + str(mm)
	if len(str(hh)) == 1:
		hh = '0' + str(hh)
	print(str(hh) + ':' + str(mm))
elif hh >= 0 and mm < 0:
	mm = 60 + mm
	hh = hh - 1
	if len(str(mm)) == 1:
		mm = '0' + str(mm)
	if len(str(hh)) == 1:
		hh = '0' + str(hh)
	print(str(hh) + ':' + str(mm))


(h1, m1) = map(int, input().split(':'))
(h2, m2) = map(int, input().split(':'))
if h1 < h2 or (h1 == h2 and m1 < m2):
	h1 += 23
	m1 += 60
	h3 = h1 - h2
	m3 = m1 - m2
elif m1 < m2:
	h1 -= 1
	m1 += 60
	h3 = h1 - h2
	m3 = m1 - m2
else:
	h3 = h1 - h2
	m3 = m1 - m2
if m3 >= 60:
	h3 += 1
	m3 -= 60
if h3 == 24:
	h3 = 0
if h3 < 10:
	h3 = '0' + str(h3)
if m3 < 10:
	m3 = '0' + str(m3)
print('{}:{}'.format(h3, m3))


hora1 = input()
hora2 = input()
hora1 = hora1.split(':')
hora2 = hora2.split(':')
Min = 0
Hora = 0
if int(hora1[1]) < int(hora2[1]):
	Hora -= 1
	Min = 60 - (int(hora2[1]) - int(hora1[1]))
if int(hora1[1]) >= int(hora2[1]):
	Min = int(hora1[1]) - int(hora2[1])
if int(hora1[0]) < int(hora2[0]):
	Hora = Hora + 24 - (int(hora2[0]) - int(hora1[0]))
if int(hora1[0]) >= int(hora2[0]):
	Hora = Hora + (int(hora1[0]) - int(hora2[0]))
while Hora < 0:
	Hora += 24
if 0 <= Hora and Hora <= 9:
	Hora = '0' + str(Hora)
if 0 <= Min and Min <= 9:
	Min = '0' + str(Min)
print(str(Hora) + ':' + str(Min))


from sys import stdin

def main():
	((h, m), (dh, dm)) = (tuple(map(int, stdin.readline().strip().split(':'))) for _ in (0, 1))
	return '{:0>2d}:{:0>2d}'.format(*divmod(((h - dh) * 60 + m - dm) % 1440, 60))
print(main())


(h, m) = map(int, input().split(':'))
(dh, dm) = map(int, input().split(':'))
h = (h + 24 - dh) % 24
if m >= dm:
	m -= dm
else:
	h = (h + 23) % 24
	m = (m + 60 - dm) % 60
print('%02d:%02d' % (h, m))


t1 = list(map(int, input().split(':')))
t2 = list(map(int, input().split(':')))
t1[0] -= t2[0]
t1[1] -= t2[1]
if t1[1] < 0:
	t1[0] -= 1
	t1[1] += 60
if t1[0] < 0:
	t1[0] += 24
print('%02d:%02d' % (t1[0], t1[1]))


I = lambda : map(int, input().split(':'))
(h, m) = I()
(ph, pm) = I()
(h, m) = (h - ph, m - pm)
(h, m) = ((h + m // 60) % 24, m % 60)
print(f'{h:02}:{m:02}')


S1 = input().split(':')
S2 = input().split(':')
h1 = int(S1[0])
m1 = int(S1[1])
h2 = int(S2[0])
m2 = int(S2[1])
if h2 + m2 == 0:
	print(':'.join(S1))
else:
	if h1 + m1 == 0:
		h1 = 24
	cur = h1 * 60 + m1
	use = h2 * 60 + m2
	cur -= use
	if cur < 0:
		cur = 24 * 60 + cur
	h1 = cur // 60
	m1 = cur % 60
	if h1 < 10:
		h1 = '0' + str(h1)
	if m1 < 10:
		m1 = '0' + str(m1)
	print(str(h1) + ':' + str(m1))


(a, b, c, d) = map(int, (input() + ':' + input()).split(':'))
x = (1440 + (a - c) * 60 + b - d) % 1440
g = lambda x: '0' * (2 - len(x)) + x
print(g(str(x // 60)) + ':' + g(str(x % 60)))


import time, datetime
s = input()
t = input()
tmp = time.mktime(time.strptime('2019-01-12 ' + s, '%Y-%m-%d %H:%M'))
tmp1 = time.mktime(time.strptime('2019-01-12 ' + t, '%Y-%m-%d %H:%M')) - time.mktime(time.strptime('2019-01-12 00:00', '%Y-%m-%d %H:%M'))
tmp -= tmp1
print(time.strftime('%H:%M', time.localtime(tmp)))


current = input()
sleep = input()
hour_current = current[:current.index(':')]
min_current = current[current.index(':') + 1:]
hour_sleep = sleep[:sleep.index(':')]
min_sleep = sleep[sleep.index(':') + 1:]
x = 0
current_in_min = int(hour_current) * 60 + int(min_current)
sleep_in_min = int(hour_sleep) * 60 + int(min_sleep)
bed_time = current_in_min - sleep_in_min
if bed_time < 0:
	bed_time = 24 * 60 + bed_time
	out_hour = bed_time // 60
	out_min = bed_time % 60
else:
	out_hour = bed_time // 60
	out_min = bed_time % 60
if out_hour < 10:
	out_hour = '0' + str(out_hour)
if out_min < 10:
	out_min = '0' + str(out_min)
print(str(out_hour) + ':' + str(out_min))


a = list(input().split(':'))
s = int(a[0]) * 60 + int(a[1])
a = list(input().split(':'))
t = int(a[0]) * 60 + int(a[1])
res = (24 * 60 + s - t) % (24 * 60)
h = res // 60
m = res % 60
ans = ''
if h < 10:
	ans += '0'
ans += str(h)
ans += ':'
if m < 10:
	ans += '0'
ans += str(m)
print(ans)


s = input()
t = input()
s = s.split(':')
t = t.split(':')
h1 = int(s[0])
h2 = int(t[0])
m1 = int(s[1])
m2 = int(t[1])
if m1 < m2:
	h2 = h2 + 1
	m1 = m1 + 60
m1 = m1 - m2
if h1 < h2:
	h1 = h1 + 24
h1 = h1 - h2
h1 = str(h1)
m1 = str(m1)
if len(h1) == 1:
	h1 = '0' + h1
if len(m1) == 1:
	m1 = '0' + m1
print(h1, end='')
print(':', end='')
print(m1)


l_s = list(map(int, input().split(':')))
l_t = list(map(int, input().split(':')))
if l_t[1] > l_s[1]:
	l_s[0] -= 1
print('%02d:%02d' % ((l_s[0] - l_t[0]) % 24, (l_s[1] - l_t[1]) % 60))


s = input()
s = s.split(':')
t = input()
t = t.split(':')
if int(s[1]) - int(t[1]) < 0:
	temp2 = 60 - abs(int(s[1]) - int(t[1]))
	tmp = int(t[0])
	tmp += 1
	t[0] = tmp
else:
	temp2 = abs(int(s[1]) - int(t[1]))
if int(s[0]) - int(t[0]) < 0:
	temp1 = 24 - abs(int(s[0]) - int(t[0]))
else:
	temp1 = abs(int(s[0]) - int(t[0]))
if len(str(temp1)) == 1 and len(str(temp2)) == 1:
	print('0' + str(temp1) + ':' + '0' + str(temp2))
elif len(str(temp1)) == 2 and len(str(temp2)) == 1:
	print(str(temp1) + ':' + '0' + str(temp2))
elif len(str(temp1)) == 1 and len(str(temp2)) == 2:
	print('0' + str(temp1) + ':' + str(temp2))
else:
	print(str(temp1) + ':' + str(temp2))


def solve():
	(h, m) = map(int, input().split(':'))
	return 60 * h + m
t = solve() - solve()
if t < 0:
	t += 60 * 24
print('%02d:%02d' % (t // 60, t % 60))


s1 = input()
s2 = input()
wakehours = int(s1[:2])
wake_min = int(s1[3:])
sleephours = int(s2[:2])
sleep_min = int(s2[3:])
time_hours = wakehours
time_min = wake_min
if sleep_min > wake_min:
	wake_min += 60
	wakehours -= 1
time_min = wake_min - sleep_min
if sleephours > wakehours:
	wakehours += 24
time_hours = wakehours - sleephours
if time_hours < 10 and time_min < 10:
	print('0' + str(time_hours) + ':0' + str(time_min))
elif time_hours < 10:
	print('0' + str(time_hours) + ':' + str(time_min))
elif time_min < 10:
	print(str(time_hours) + ':0' + str(time_min))
else:
	print(str(time_hours) + ':' + str(time_min))


(sh, sm) = map(int, input().split(':'))
(th, tm) = map(int, input().split(':'))
sh -= th
sm -= tm
if sm < 0:
	sm += 60
	sh -= 1
if sh < 0:
	sh += 24
print(str(sh).zfill(2) + ':' + str(sm).zfill(2))


jawab = [0, 0]
a = input().split(':')
b = input().split(':')
if int(a[1]) < int(b[1]):
	if a[0] != '00':
		a[0] = int(a[0]) - 1
	else:
		a[0] = 23
	a[1] = int(a[1]) + 60
	jawab[1] = str(a[1] - int(b[1]))
else:
	jawab[1] = str(int(a[1]) - int(b[1]))
if int(a[0]) < int(b[0]):
	if a[0] == '00':
		a[0] = 23
		b[0] = int(b[0]) - 1
	else:
		b[0] = int(b[0]) - int(a[0]) - 1
		a[0] = 23
	jawab[0] = str(a[0] - b[0])
else:
	jawab[0] = str(int(a[0]) - int(b[0]))
if len(jawab[0]) == 1:
	jawab[0] = '0' + str(jawab[0])
if len(jawab[1]) == 1:
	jawab[1] = '0' + str(jawab[1])
print(':'.join(jawab))


t = input()
T = t.split(':')
HT = int(T[0])
MT = int(T[1])
s = input()
S = s.split(':')
HS = int(S[0])
MS = int(S[1])
MR = MT - MS
if MR < 0:
	MR += 60
	HT -= 1
HR = HT - HS
if HR < 0:
	HR += 24
if HR < 10:
	h = '0' + str(HR)
else:
	h = str(HR)
if MR < 10:
	m = '0' + str(MR)
else:
	m = str(MR)
print(h + ':' + m)


s = input()
t = input()
mms = int(s[:2]) * 60 + int(s[3:])
mmt = int(t[:2]) * 60 + int(t[3:])
diff = (mms + 1440 - mmt) % 1440
h = diff // 60
m = diff % 60
print(str(h).zfill(2) + ':' + str(m).zfill(2))


(H1, M1) = list(map(int, input().split(':')))
(H2, M2) = list(map(int, input().split(':')))
(Min1, Min2) = (H1 * 60 + M1, H2 * 60 + M2)
Result = Min1 - Min2 if Min1 - Min2 >= 0 else Min1 - Min2 + 1440
print(Result // 60 if len(str(Result // 60)) == 2 else '0' + str(Result // 60), end=':')
print(Result % 60 if len(str(Result % 60)) == 2 else '0' + str(Result % 60))


(h, m) = map(int, input().split(':'))
(sh, sm) = map(int, input().split(':'))
hh = h - sh
mm = m - sm
if mm < 0:
	hh -= 1
	mm = 60 - abs(mm)
if hh < 0:
	hh = 24 - abs(hh)
if len(str(hh)) == 1:
	hh = '0' + str(hh)
if len(str(mm)) == 1:
	mm = '0' + str(mm)
print(str(hh) + ':' + str(mm))


n = [int(k) for k in input().split(':')]
m = [int(k) for k in input().split(':')]
k = n[0] * 60 + n[1]
j = m[0] * 60 + m[1]

def h(x):
	for s in range(2 - len(x)):
		x = str(0) + x
	return x

def f(x):
	a = int(x / 60)
	b = x % 60
	c = h(str(a)) + ':' + h(str(b))
	return c
if k >= j:
	print(f(k - j))
else:
	print(f(k + 24 * 60 - j))


s = input().split(':')
p = input().split(':')
(h1, m1) = (int(s[0]), int(s[1]))
(h2, m2) = (int(p[0]), int(p[1]))
m3 = m1 - m2
h3 = h1 - h2
if m3 < 0:
	h3 -= 1
	m3 += 60
if h3 < 0:
	h3 += 24
if h3 < 10:
	h3 = '0' + str(h3)
else:
	h3 = str(h3)
if m3 < 10:
	m3 = '0' + str(m3)
else:
	m3 = str(m3)
print(h3 + ':' + m3)


s = input()
t = input()
if s[0] == '0' and s[3] == '0':
	h1 = int(s[1])
	m1 = int(s[4])
elif s[0] == '0' and s[3] != '0':
	h1 = int(s[1])
	m1 = int(s[3:])
elif s[0] != '0' and s[3] == '0':
	h1 = int(s[:2])
	m1 = int(s[4])
elif s[0] != '0' and s[3] != '0':
	h1 = int(s[:2])
	m1 = int(s[3:])
if t[0] == '0' and t[3] == '0':
	h2 = int(t[1])
	m2 = int(t[4])
elif t[0] == '0' and t[3] != '0':
	h2 = int(t[1])
	m2 = int(t[3:])
elif t[0] != '0' and t[3] == '0':
	h2 = int(t[:2])
	m2 = int(t[4])
elif t[0] != '0' and t[3] != '0':
	h2 = int(t[:2])
	m2 = int(t[3:])
if m1 < m2:
	h3 = (h1 + 23 - h2) % 24
	m3 = m1 + 60 - m2
elif m1 >= m2:
	h3 = (h1 + 24 - h2) % 24
	m3 = m1 - m2
if h3 > 9 and m3 > 9:
	print(str(h3) + ':' + str(m3))
elif h3 > 9 and m3 <= 9:
	print(str(h3) + ':' + '0' + str(m3))
elif h3 <= 9 and m3 > 9:
	print('0' + str(h3) + ':' + str(m3))
elif h3 <= 9 and m3 <= 9:
	print('0' + str(h3) + ':' + '0' + str(m3))


wake_up_time = input().split(':')
sleep_duration = input().split(':')
wake_up_time = 60 * int(wake_up_time[0]) + int(wake_up_time[1])
sleep_duration = 60 * int(sleep_duration[0]) + int(sleep_duration[1])
bed_time = wake_up_time - sleep_duration
if bed_time < 0:
	bed_time += 24 * 60
print('{:0>2d}:{:0>2d}'.format(*divmod(bed_time, 60)))


wakeupTime = input().split(':')
sleepTime = input().split(':')
wakeHours = int(wakeupTime[0])
sleepHours = int(sleepTime[0])
wakeMin = int(wakeupTime[1])
sleepMin = int(sleepTime[1])
hoursResult = 0
minResult = 0
printedHours = ''
printedMin = ''
if wakeHours < sleepHours or wakeHours == 0:
	wakeHours += 24
	hoursResult = wakeHours - sleepHours
else:
	hoursResult = wakeHours - sleepHours
if wakeMin < sleepMin:
	wakeMin += 60
	minResult = wakeMin - sleepMin
	if hoursResult == 0:
		hoursResult += 24
		hoursResult -= 1
	else:
		hoursResult -= 1
else:
	minResult = wakeMin - sleepMin
if hoursResult == 0 or hoursResult == 24:
	printedHours = '00'
elif hoursResult < 10:
	printedHours = '0' + str(hoursResult)
else:
	printedHours = str(hoursResult)
if minResult == 0:
	printedMin = '00'
elif minResult < 10:
	printedMin = '0' + str(minResult)
else:
	printedMin = str(minResult)
print(printedHours + ':' + printedMin)


s = input().split(':')
t = input().split(':')
x = int(s[0]) - int(t[0])
y = int(s[1]) - int(t[1])
if y < 0:
	y += 60
	x -= 1
if x < 0:
	x += 24
if x < 10:
	print(0, end='')
	print(x, end='')
else:
	print(x, end='')
print(':', end='')
if y < 10:
	print(0, end='')
	print(y)
else:
	print(y)


from math import *
from collections import deque
from copy import deepcopy
import sys

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def multi():
	return map(int, input().split())

def lis():
	return list(map(int, inp().split()))

def out(var):
	sys.stdout.write(str(var))

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
a = str(inp())
b = str(inp())
hr = 0
mini = 0
flag = False
if int(a[3:5]) >= int(b[3:5]):
	mini = int(a[3:5]) - int(b[3:5])
else:
	flag = True
	mini = 60 - abs(int(a[3:5]) - int(b[3:5]))
if int(a[0:2]) >= int(b[0:2]) and (not flag or not int(a[0:2]) == int(b[0:2])):
	if flag:
		hr = int(a[0:2]) - int(b[0:2]) - 1
	else:
		hr = int(a[0:2]) - int(b[0:2])
elif flag:
	hr = 23 - abs(int(a[0:2]) - int(b[0:2]))
else:
	hr = 24 - abs(int(a[0:2]) - int(b[0:2]))
if int(hr) < 10:
	print('0' + str(hr), end='')
else:
	print(str(hr), end='')
print(':', end='')
if mini < 10:
	print('0' + str(mini), end='')
else:
	print(str(mini))


s = input()
t = input()
cth = sth = ctm = stm = ''
for i in range(0, 5):
	if i < 2:
		cth += s[i]
		sth += t[i]
	elif i > 2:
		ctm += s[i]
		stm += t[i]
ah = int(cth) - int(sth)
am = int(ctm) - int(stm)
if ah > 0 and am < 0:
	ah = ah - 1
if cth == sth and ctm < stm:
	ah = 23
if ah < 0 and am >= 0:
	ah = 24 + ah
if ah < 0 and am < 0:
	ah = 23 + ah
if am < 0:
	am = 60 + am
if len(str(ah)) == 1 and len(str(am)) == 1:
	print('0', ah, ':', '0', am, sep='')
elif len(str(ah)) == 1 and len(str(am)) == 2:
	print('0', ah, ':', am, sep='')
elif len(str(ah)) == 2 and len(str(am)) == 1:
	print(ah, ':', '0', am, sep='')
else:
	print(ah, ':', am, sep='')


def main():
	[s_hour, s_min] = [int(_) for _ in input().split(':')]
	[t_hour, t_min] = [int(_) for _ in input().split(':')]
	s_min -= t_min
	if s_min < 0:
		s_min += 60
		s_hour -= 1
	s_hour -= t_hour
	if s_hour < 0:
		s_hour += 24
	print('%02d:%02d' % (s_hour, s_min))
main()


s = list(map(int, input().split(':')))
t = list(map(int, input().split(':')))
c = 0
if t[1] > s[1]:
	s[1] += 60
	s[1] -= t[1]
	c += 1
else:
	s[1] -= t[1]
if s[0] - (t[0] + c) < 0:
	d = t[0] + c - s[0]
	s[0] = 24 - d
else:
	s[0] -= t[0] + c
s = list(map(str, s))
for i in range(2):
	if len(s[i]) == 1:
		s[i] = '0' + s[i]
print(':'.join(s))


end = input().split(':')
start = input().split(':')
startmin = int(start[0])
endmin = int(end[0])
startsec = int(start[1])
endsec = int(end[1])
secdiff = endsec - startsec
mindiff = endmin - startmin
if secdiff < 0:
	secdiff += 60
	mindiff -= 1
if mindiff < 0:
	mindiff += 24
print(('0' if mindiff < 10 else '') + str(mindiff) + ':' + ('0' if secdiff < 10 else '') + str(secdiff))


import sys
inf = float('inf')
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def int1():
	return int(input())
import string
import math
from itertools import combinations

def main():
	s1 = input()
	s2 = input()
	x1 = int(s1[:2])
	x2 = int(s1[3:])
	y1 = int(s2[:2])
	y2 = int(s2[3:])
	x3 = x1 - y1
	y = x2 - y2
	if y < 0:
		y = 60 + y
		x3 = x3 - 1
	if x3 < 0:
		x3 = 24 + x3
	if x3 < 10:
		x3 = str(0) + str(x3)
	if y < 10:
		y = str(0) + str(y)
	print(str(x3) + ':' + str(y))
main()


(h1, m1) = map(int, input().split(':'))
(h2, m2) = map(int, input().split(':'))
t = h1 * 60 + m1 - h2 * 60 - m2
h = t // 60
h %= 24
m = t % 60
print(str(h // 10) + str(h % 10) + ':' + str(m // 10) + str(m % 10))


s = input().split(':')
t = input().split(':')
h = int(s[0]) - int(t[0])
m = int(s[1]) - int(t[1])
while m < 0:
	m += 60
	h -= 1
while h < 0:
	h += 24
mstr = ''
if m < 10:
	mstr = '0' + str(m)
else:
	mstr = str(m)
hstr = ''
if h < 10:
	hstr = '0' + str(h)
else:
	hstr = str(h)
print(hstr + ':' + mstr)


from datetime import datetime, date, time, timedelta

def hours_minutes(td):
	return (td.seconds // 3600, td.seconds // 60 % 60)
strdtupper = input().split(':')
strdtsleep = input().split(':')
dtup = time(int(strdtupper[0]), int(strdtupper[1]))
dtsleep = time(int(strdtsleep[0]), int(strdtsleep[1]))
answerdate = timedelta(minutes=dtup.minute, hours=dtup.hour) - timedelta(minutes=dtsleep.minute, hours=dtsleep.hour)
dateZ = hours_minutes(answerdate)
print('{}:{}'.format((lambda x: '0{}'.format(x) if x // 10 <= 0 else x)(dateZ[0]), (lambda x: '0{}'.format(x) if x // 10 <= 0 else x)(dateZ[1])))


s = [int(x) for x in input().split(':')]
t = [int(x) for x in input().split(':')]
s1 = s[0] * 60 + s[1] + 1440
t1 = t[0] * 60 + t[1]
p = (s1 - t1) % 1440
print('0' * (2 - len(str(p // 60))) + str(p // 60) + ':' + '0' * (2 - len(str(p % 60))) + str(p % 60))


(h, m) = [int(x) for x in input().split(':')]
(h_del, m_del) = [int(x) for x in input().split(':')]
if m - m_del < 0:
	h = (h - 1) % 24
m = (m - m_del) % 60
h = (h - h_del) % 24
m = str(m)
h = str(h)
if len(m) == 1:
	m = '0' + m
if len(h) == 1:
	h = '0' + h
print(h + ':' + m)


(a, b) = (input().split(':'), input().split(':'))
d = (int(a[1]) - int(b[1])) % 60
if a[1] < b[1]:
	if a[0] <= b[0]:
		c = (int(a[0]) - int(b[0]) - 1) % 24
	else:
		c = int(a[0]) - int(b[0]) - 1
elif a[0] < b[0]:
	c = (int(a[0]) - int(b[0])) % 24
else:
	c = int(a[0]) - int(b[0])
if c < 10:
	c = '0' + str(c)
if d < 10:
	d = '0' + str(d)
print('{}:{}'.format(c, d))


pt = input()
sp = input()
pth = int(pt[0:2])
ptm = int(pt[3:5])
sph = int(sp[0:2])
spm = int(sp[3:5])
if spm <= ptm:
	pstm = ptm - spm
	if pstm < 0:
		pstm = pstm + 60
	if sph <= pth:
		psth = pth - sph
		if psth < 0:
			psth = 24 + psth
	elif sph > pth:
		psth = 24 - (sph - pth)
		if psth < 0:
			psth = 24 + psth
else:
	pstm = 60 - (spm - ptm)
	if pstm < 0:
		pstm = pstm + 60
	if sph <= pth:
		psth = pth - sph - 1
		if psth < 0:
			psth = 24 + psth
	elif sph > pth:
		psth = 24 - (sph - pth) - 1
		if psth < 0:
			psth = 24 + psth
if pstm < 10:
	pstm = '0' + str(pstm)
elif pstm >= 10:
	pstm = str(pstm)
if psth < 10:
	psth = '0' + str(psth)
elif psth >= 10:
	psth = str(psth)
s = psth + ':' + pstm
print(s)


a = input()
b = input()
z = int(a[:2])
z2 = int(b[:2])
z = z - z2
if z < 0:
	z = 24 + z
else:
	z = str(z)
	if len(z) == 1:
		z = '0' + z
hs = z
z = int(a[3:])
z2 = int(b[3:])
z = z - z2
if z >= 0:
	z = str(z)
	if len(z) == 1:
		z = '0' + z
else:
	z = 60 + z
	hs = int(hs)
	i = hs - 1
	if i < 0:
		i = 24 + i
	else:
		i = str(i)
		if len(i) == 1:
			i = '0' + i
	hs = i
hs = str(hs)
z = str(z)
if len(z) == 1:
	z = '0' + z
print(hs + ':' + z)


class Time:

	def __init__(self, hh, mm):
		self.h = hh
		self.m = mm

	def __sub__(self, other):
		res_h = (self.h - other.h) % 24
		res_m = (self.m - other.m) % 60
		if self.m - other.m < 0:
			res_h = (res_h - 1) % 24
		return Time(res_h, res_m)

	def __str__(self):
		return '{}:{}'.format(str(self.h).zfill(2), str(self.m).zfill(2))
cur_time = Time(*list(map(int, input().split(':'))))
sleep_time = Time(*list(map(int, input().split(':'))))
print(cur_time - sleep_time)


(h1, m1) = map(int, input().split(':'))
(h2, m2) = map(int, input().split(':'))
if h1 == 0:
	h1 = 24
if h2 == 0:
	h2 = 24
time1 = h1 * 60 + m1
time2 = h2 * 60 + m2
if time2 > time1:
	time1 += 24 * 60
timex = time1 - time2
hx = timex // 60
mx = timex % 60
if hx < 10:
	hx = '0' + str(hx)
if mx < 10:
	mx = '0' + str(mx)
print(hx, end='')
print(':', end='')
print(mx, end='')


time = input().split(':')
sleep = input().split(':')
hour = (int(time[0]) - int(sleep[0])) % 24
minute = int(time[1]) - int(sleep[1])
if minute < 0:
	hour = (hour - 1) % 24
	minute %= 60
if hour < 10:
	hour = '0' + str(hour)
else:
	hour = str(hour)
if minute < 10:
	minute = '0' + str(minute)
else:
	minute = str(minute)
start = [hour, minute]
print(start[0] + ':' + start[1])


def readtime():
	s = input()
	h = int(s[0]) * 10 + int(s[1])
	m = int(s[3]) * 10 + int(s[4])
	return [h, m]

def printtime(h, m):
	s = str(h)
	if len(s) < 2:
		s = '0' + s
	f = str(m)
	if len(f) < 2:
		f = '0' + f
	print(s + ':' + f)
t1 = readtime()
t2 = readtime()
hh = t1[0] - t2[0]
mm = t1[1] - t2[1]
if mm < 0:
	mm += 60
	hh -= 1
if hh < 0:
	hh += 24
printtime(hh, mm)


(s, t) = (tuple(map(int, input().split(':'))) for i in '01')
z = ((s[0], 24)[not s[0]] - t[0]) * 60 + s[1] - t[1]
print('{:02}:{:02}'.format(z // 60 % 24, z % 60))


from datetime import datetime, timedelta, time
now = datetime.strptime(input(), '%H:%M')
td = datetime.strptime(input(), '%H:%M')
h = (now - td).seconds // 3600
m = (now - td).seconds // 60 % 60
s = time(h, m)
print(s.strftime('%H:%M'))


import math
s = str(input())
s1 = str(input())
x = s[0:2]
x1 = s[3:len(s)]
y = s1[0:2]
y1 = s1[3:len(s1)]
d1 = int(x)
d2 = int(x1)
d3 = int(y)
d4 = int(y1)
h = d1 * 60 + d2
h1 = d3 * 60 + d4
t = h - h1
if t < 0:
	t = 24 * 60 + t
m = str(t // 60)
n = str(t % 60)
if len(m) == 1:
	if len(n) == 1:
		print('0' + m + ':' + '0' + n)
	else:
		print('0' + m + ':' + n)
elif len(n) == 1:
	print(m + ':' + '0' + n)
else:
	print(m + ':' + n)


s = input()
a = int(s[0:2]) * 60 + int(s[3:5])
s = input()
b = int(s[0:2]) * 60 + int(s[3:5])
c = (a - b + 60 * 24) % (60 * 24)
print(c // 60 // 10, c // 60 % 10, sep='', end=':')
print(c % 60 // 10, c % 60 % 10, sep='')


string = input()
time = string.split(':')
(a, b) = (int(time[0]), int(time[1]))
string = input()
time = string.split(':')
(h, m) = (int(time[0]), int(time[1]))
x = a * 60 + b
y = h * 60 + m
if x < y:
	x += 1440
t = x - y
temp = t // 60 % 24
p = str(temp)
if temp < 10:
	p = '0' + p
temp = t % 60
q = str(temp)
if temp < 10:
	q = '0' + q
print('%s:%s' % (p, q))


s1 = input()
s2 = input()
ans1 = int(s1[:2]) - int(s2[:2])
ans2 = int(s1[3:]) - int(s2[3:])
if ans2 >= 0:
	k2 = '0' + str(ans2)
	if ans1 >= 0:
		k1 = '0' + str(ans1)
		print(k1[-2:] + ':' + k2[-2:])
	else:
		ans1 += 24
		k1 = '0' + str(ans1)
		print(k1[-2:] + ':' + k2[-2:])
else:
	ans2 += 60
	ans1 -= 1
	k2 = '0' + str(ans2)
	if ans1 >= 0:
		k1 = '0' + str(ans1)
		print(k1[-2:] + ':' + k2[-2:])
	else:
		ans1 += 24
		k1 = '0' + str(ans1)
		print(k1[-2:] + ':' + k2[-2:])


s = input().split(':')
s[0] = int(s[0])
s[1] = int(s[1])
t = input().split(':')
t[0] = int(t[0])
t[1] = int(t[1])

def v(n):
	n = str(n)
	if len(n) == 1:
		return '0' + n
	else:
		return n
if s[0] >= t[0] and s[1] >= t[1]:
	print(v(s[0] - t[0]) + ':' + v(s[1] - t[1]))
elif s[0] > t[0] and s[1] < t[1]:
	print(v(s[0] - t[0] - 1) + ':' + v(s[1] + 60 - t[1]))
elif s[0] == t[0] and s[1] < t[1]:
	print('23' + ':' + v(s[1] + 60 - t[1]))
elif s[0] < t[0] and s[1] >= t[1]:
	print(v(24 - (t[0] - s[0])) + ':' + v(s[1] - t[1]))
elif s[0] < t[0] and s[1] < t[1]:
	print(v(24 - (t[0] - s[0]) - 1) + ':' + v(60 + s[1] - t[1]))


(h1, m1) = list(map(int, input().split(':')))
(h2, m2) = list(map(int, input().split(':')))
if m1 < m2:
	m1 = m1 + 60
	h1 = h1 - 1
	t = m1 - m2
	if h1 < h2:
		h1 = h1 + 24
		p = h1 - h2
		if t < 10:
			t = '0' + str(t)
		if p < 10:
			p = '0' + str(p)
		print('{}:{}'.format(p, t))
	else:
		p = h1 - h2
		if t < 10:
			t = '0' + str(t)
		if p < 10:
			p = '0' + str(p)
		print('{}:{}'.format(p, t))
else:
	t = m1 - m2
	if h1 < h2:
		h1 = h1 + 24
		p = h1 - h2
		if t < 10:
			t = '0' + str(t)
		if p < 10:
			p = '0' + str(p)
		print('{}:{}'.format(p, t))
	else:
		p = h1 - h2
		if t < 10:
			t = '0' + str(t)
		if p < 10:
			p = '0' + str(p)
		print('{}:{}'.format(p, t))


s = input()
t = input()
hour = int(s[:2]) - int(t[:2])
minutes = int(s[3:5]) - int(t[3:5])
if minutes < 0:
	minutes += 60
	hour -= 1
if hour < 0:
	hour += 24
print('{:02}:{:02}'.format(hour, minutes))


(ch, m) = input().split(':')
(tch, tm) = input().split(':')
ch = int(ch)
tch = int(tch)
m = int(m)
tm = int(tm)
s1 = ch * 60 + m
s2 = tch * 60 + tm
s3 = s1 - s2
if s3 < 0:
	s3 = 24 * 60 + s3
ch = s3 // 60
m = s3 % 60
if ch < 10:
	print('0' + str(ch), end=':')
else:
	print(str(ch), end=':')
if m < 10:
	print('0' + str(m))
else:
	print(str(m))


s = input()
t = input()
vstal = 60 * (int(s[0]) * 10 + int(s[1])) + 10 * int(s[3]) + int(s[4])
spal = 60 * (int(t[0]) * 10 + int(t[1])) + 10 * int(t[3]) + int(t[4])
leg = (vstal - spal) % (24 * 60)
x0 = leg // 600
x1 = leg // 60 % 10
x2 = ':'
x3 = leg % 60 // 10
x4 = leg % 60 % 10
print(str(x0) + str(x1) + x2 + str(x3) + str(x4))


s = input()
t = input()
hrs = int(s[:2]) - int(t[:2])
mins = int(s[3:]) - int(t[3:])
if mins < 0:
	mins += 60
	hrs -= 1
if hrs < 0:
	hrs += 24
hrs = str(hrs)
mins = str(mins)
if len(hrs) == 1:
	hrs = '0' + hrs
if len(mins) == 1:
	mins = '0' + mins
print(hrs + ':' + mins)


s = list(input())
t = list(input())
h1 = int(s[0] + s[1])
m1 = int(s[3] + s[4])
h2 = int(t[0] + t[1])
m2 = int(t[3] + t[4])
ah = h1 - h2
am = m1 - m2
if am < 0:
	am += 60
	ah -= 1
if ah < 0:
	ah += 24
if am < 10:
	am = '0' + str(am)
if ah < 10:
	ah = '0' + str(ah)
print(str(ah) + ':' + str(am))


__copyright__ = ''
__author__ = 'Son-Huy TRAN'
__email__ = 'sonhuytran@gmail.com'
__doc__ = ''
__version__ = '1.0'

def main() -> int:
	(sh, sm) = map(int, input().split(':'))
	(th, tm) = map(int, input().split(':'))
	if sh < th or (sh == th and sm < tm):
		sh += 24
	if sm < tm:
		sm += 60
		sh -= 1
	sm -= tm
	sh -= th
	print('%02d:%02d' % (sh, sm))
	return 0
exit(main())


s = list(map(int, input().split(':')))
t = list(map(int, input().split(':')))
h1 = s[0] * 60 + s[1]
h2 = t[0] * 60 + t[1]
a = h1 - h2 if h1 - h2 >= 0 else h1 - h2 + 24 * 60
print(a // 60 if a // 60 >= 10 else '0' + str(a // 60), a % 60 if a % 60 >= 10 else '0' + str(a % 60), sep=':')


def time(h, m):
	if h < 0:
		h += 24
	if h < 10:
		h = f'{0}{h}'
	if m < 10:
		m = f'{0}{m}'
	return f'{h}:{m}'

def solve(s, t):
	(sh, sm) = map(int, s.split(':'))
	(th, tm) = map(int, t.split(':'))
	tot_s = sh * 60 + sm
	tot_t = th * 60 + tm
	res = tot_s - tot_t
	return time(res // 60, res % 60)

def main():
	s = input()
	t = input()
	print(solve(s, t))
main()


import os
time = input()
spend = input()
var = 0
m = 0
h = 0
if int(time[3:]) - int(spend[3:]) < 0:
	m = str(60 + int(time[3:]) - int(spend[3:]))
	var = 1
else:
	m = str(int(time[3:]) - int(spend[3:]))
if int(time[0:2]) - int(spend[0:2]) - var < 0:
	h = str(24 + int(time[0:2]) - int(spend[0:2]) - var)
else:
	h = str(int(time[0:2]) - int(spend[0:2]) - var)
if len(h) == 1:
	h = '0' + h
if len(m) == 1:
	m = '0' + m
print(h, end='')
print(':', end='')
print(m)


s = input()
wh = int(s[0] + s[1])
wm = int(s[3] + s[4])
s = input()
th = int(s[0] + s[1])
tm = int(s[3] + s[4])
tm += th * 60
wm += wh * 60
wm -= tm
if wm < 0:
	wm = 1440 + wm
ansh = str(wm // 60)
ansm = str(wm % 60)
if len(ansh) < 2:
	ansh = '0' + ansh
if len(ansm) < 2:
	ansm = '0' + ansm
print(ansh + ':' + ansm)


import math
import bisect
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
I = lambda : int(input())
tup = lambda : map(int, input().split())
lst = lambda : list(map(int, input().split()))
t = 1
while t:
	(h1, m1) = map(int, input().split(':'))
	(h2, m2) = map(int, input().split(':'))
	m = m1 - m2
	h = h1 - h2
	if m < 0:
		m += 60
		h -= 1
	if h < 0:
		h += 24
	print('{0:02d}:{1:02d}'.format(h, m))
	t -= 1


s = list(map(int, input().split(':')))
t = list(map(int, input().split(':')))
ms = s[0] * 60 + s[1]
mt = t[0] * 60 + t[1]
if ms >= mt:
	(h, m) = divmod(ms - mt, 60)
	print(f'{h:02}:{m:02}')
else:
	(h, m) = divmod(ms + 24 * 60 - mt, 60)
	print(f'{h:02}:{m:02}')


s = input().split(':')
t = input().split(':')
hours = int(s[0]) - int(t[0])
minutes = (int(s[1]) - int(t[1])) % 60
if int(t[1]) > int(s[1]):
	hours -= 1
hours %= 24
hours = '00' + str(hours)
minutes = '00' + str(minutes)
print(hours[-2:] + ':' + minutes[-2:])


s = list(map(int, input().split(':')))
t = list(map(int, input().split(':')))
p = [0, 0]
if s[0] - t[0] < 0:
	p[0] = 24 - (t[0] - s[0])
else:
	p[0] = s[0] - t[0]
if s[1] - t[1] < 0:
	p[1] = 60 - (t[1] - s[1])
	if p[0] == 0:
		p[0] = 23
	else:
		p[0] -= 1
else:
	p[1] = s[1] - t[1]
if p[0] < 10:
	print('0', p[0], sep='', end=':')
else:
	print(p[0], end=':')
if p[1] < 10:
	print('0', p[1], sep='')
else:
	print(p[1])


(h, m) = map(int, input().strip().split(':'))
(h_, m_) = map(int, input().strip().split(':'))
h -= h_
m -= m_
if m < 0:
	h -= 1
	m = 60 + m
if h < 0:
	h %= 24
print('%02d:%02d' % (h, m))


def main():

	def f(sh, sm, th, tm):
		sh -= th
		sm -= tm
		if sm < 0:
			sh -= 1
			sm %= 60
		if sh < 0:
			sh %= 24
		return (sh, sm)
	s = map(int, input().split(':'))
	t = map(int, input().split(':'))
	return '{:02d}:{:02d}'.format(*f(*s, *t))
print(main())


strS = input()
strT = input()
s = int(strS[0:2]) * 60 + int(strS[3:5])
t = int(strT[0:2]) * 60 + int(strT[3:5])
res = s - t
if res < 0:
	res = res + 1440
s = res // 60 + 100
t = res % 60 + 100
print(str(s)[1:3] + ':' + str(t)[1:3])


R = lambda : list(map(int, input().split(':')))
s = R()
t = R()
s[0] -= t[0]
s[1] -= t[1]
if s[1] < 0:
	s[0] -= 1
	s[1] += 60
if s[0] < 0:
	s[0] += 24
print('{:02}:{:02}'.format(*s))


(a, b) = map(int, input().split(':'))
(c, d) = map(int, input().split(':'))

def pr(c, d):
	print(c // 10, c % 10, ':', d // 10, d % 10, sep='', end='')
if b >= d:
	d = b - d
else:
	c += 1
	d = 60 + b - d
if c == 24:
	pr(a, d)
elif a >= c:
	pr(a - c, d)
else:
	pr(24 + a - c, d)


from sys import stdin, stdout, stderr, setrecursionlimit
setrecursionlimit(100000)

def debug(*e):
	if not __debug__:
		print(*e, file=stderr)

def dd(*vals):
	import inspect, re
	frame = inspect.getframeinfo(inspect.stack()[1][0])
	vs = re.search('dd\\((.+)\\)', frame.code_context[0]).group(1).split(',')
	if vs:
		debug(','.join(('{0} = {1}'.format(vs[i], v) for (i, v) in enumerate(vals))))

def trace(f):

	def traced(*args, **kw):
		debug('calling {} with args {}, {}'.format(f.__name__, args, kw))
		return f(*args, **kw)
	return traced

def read():
	return stdin.readline().rstrip()

def readarr(sep=None, maxsplit=-1):
	return read().split(sep, maxsplit)

def readint():
	return int(read())

def readintarr(sep=None, maxsplit=-1):
	return [int(a) for a in readarr(sep, maxsplit)]

def write(*args, **kwargs):
	sep = kwargs.get('sep', ' ')
	end = kwargs.get('end', '\n')
	stdout.write(sep.join((str(a) for a in args)) + end)

def writearr(arr, sep=' ', end='\n'):
	stdout.write(sep.join((str(a) for a in arr)) + end)
s = [int(i) for i in read().split(':')]
t = [int(i) for i in read().split(':')]
if s == [0, 0]:
	s = [24, 0]
r = [(s[0] - t[0]) % 24, (s[1] - t[1]) % 60]
if s[1] - t[1] < 0:
	r[0] = (r[0] - 1) % 24
write('{:02d}:{:02d}'.format(r[0], r[1]))


a = list(map(int, input().split(':')))
b = list(map(int, input().split(':')))
h = 0
m = 0
if a[1] < b[1]:
	a[0] -= 1
	m = 60 + a[1] - b[1]
else:
	m = a[1] - b[1]
if a[0] < b[0]:
	h = 24 + a[0] - b[0]
else:
	h = a[0] - b[0]
if h < 10:
	h = '0' + str(h)
if m < 10:
	m = '0' + str(m)
print(str(h) + ':' + str(m))


from datetime import datetime
s = datetime.strptime(input(), '%H:%M')
t = datetime.strptime(input(), '%H:%M')
sec = (s - t).seconds
(hours, rem) = divmod(sec, 60 ** 2)
(minutes, sec) = divmod(rem, 60)
print(str(hours).zfill(2) + ':' + str(minutes).zfill(2))


from functools import reduce
from operator import *
from math import *
from sys import *
from string import *
from collections import *
setrecursionlimit(10 ** 7)
dX = [-1, 1, 0, 0, -1, 1, -1, 1]
dY = [0, 0, -1, 1, 1, -1, -1, 1]
RI = lambda : list(map(int, input().split()))
RS = lambda : input().rstrip().split()
(h1, m1) = map(int, input().split(':'))
(h2, m2) = map(int, input().split(':'))
m1 -= m2
if m1 < 0:
	h1 -= 1
	m1 += 60
h1 -= h2
if h1 < 0:
	h1 += 24
(h1, m1) = (str(h1), str(m1))
if len(h1) == 1:
	h1 = '0' + h1
if len(m1) == 1:
	m1 = '0' + m1
print(h1 + ':' + m1)


(hour, mnt) = map(int, input().split(':'))
(durH, durM) = map(int, input().split(':'))
resM = mnt - durM
sn = (resM // (abs(resM) + 0.1) - abs(resM // (abs(resM) + 0.1))) / -2
resM += sn * 60
resH = hour - durH - sn
resH += (resH // (abs(resH) + 0.1) - abs(resH // (abs(resH) + 0.1))) * -12
print(f'{str(int(resH)).zfill(2)}:{str(int(resM)).zfill(2)}')


def tmins():
	(sh, sm) = map(int, input().split(':'))
	return 60 * sh + sm
t = tmins() - tmins()
if t < 0:
	t += 60 * 24
print('%02d:%02d' % (t // 60, t % 60))


(s_hour, s_minute) = map(int, input().split(':'))
(t_hour, t_minute) = map(int, input().split(':'))
if s_minute < t_minute:
	s_minute = 60 + s_minute - t_minute
	if s_hour == 0:
		s_hour = 23
	else:
		s_hour -= 1
else:
	s_minute -= t_minute
if s_hour < t_hour:
	s_hour = 24 + s_hour - t_hour
else:
	s_hour -= t_hour
time = (2 - len(str(s_hour))) * '0' + str(s_hour) + ':' + (2 - len(str(s_minute))) * '0' + str(s_minute)
print(time)


s = input()
t = input()
p = ''
h = 0
m = 0
if int(s.split(':')[0]) < int(t.split(':')[0]):
	h = int(s.split(':')[0]) + 24 - int(t.split(':')[0])
else:
	h = int(s.split(':')[0]) - int(t.split(':')[0])
if int(s.split(':')[1]) < int(t.split(':')[1]):
	m = int(s.split(':')[1]) + 60 - int(t.split(':')[1])
	if int(s.split(':')[0]) == int(t.split(':')[0]) and m == 59:
		h = int(s.split(':')[0]) + 1
	elif int(s.split(':')[0]) == int(t.split(':')[0]):
		h = int(s.split(':')[0])
	else:
		h -= 1
else:
	m = int(s.split(':')[1]) - int(t.split(':')[1])
if int(s.split(':')[0]) == 0 and int(t.split(':')[0]) == 0 and (int(s.split(':')[1]) == 0) and (int(t.split(':')[1]) == 1):
	h = 23
if h < 10:
	p = '0' + str(h)
else:
	p = str(h)
if m < 10:
	p += ':0' + str(m)
else:
	p += ':' + str(m)
print(p)


s = input()
t = input()
(a, b) = (int(s[:2]), int(s[3:]))
(c, d) = (int(t[:2]), int(t[3:]))
a -= c
b -= d
if b < 0:
	a -= 1
	b = 60 + b
if a < 0:
	a = 24 + a
if a < 10:
	print(0, end='')
print(a, ':', end='', sep='')
if b < 10:
	print(0, end='')
print(b)


(s, t) = (input(), input())
h1 = int(s[0:2])
h2 = int(t[0:2])
m1 = int(s[3:])
m2 = int(t[3:])
m3 = m1 - m2
if m3 < 0:
	m3 = 60 + m1 - m2
	h3 = h1 - h2 - 1
	if h3 < 0:
		h3 = 24 + h3
else:
	h3 = h1 - h2
	if h3 < 0:
		h3 += 24
if h3 < 10 and m3 < 10:
	print('0', h3, ':', '0', m3, sep='')
elif h3 >= 10 and m3 < 10:
	print(h3, ':', '0', m3, sep='')
elif h3 < 10 and m3 >= 10:
	print('0', h3, ':', m3, sep='')
else:
	print(h3, ':', m3, sep='')


s = input()
t = input()
import datetime
sTime = datetime.datetime.strptime(s, '%H:%M')
tTime = datetime.datetime.strptime(t, '%H:%M')
x = sTime - tTime
(days, seconds) = (x.days, x.seconds)
hours = seconds // 3600
minutes = seconds % 3600 // 60
strmin = str(minutes)
strhour = str(hours)
if minutes < 10:
	strmin = '0' + strmin
if hours < 10:
	strhour = '0' + strhour
print(strhour + ':' + strmin)


def ss(a):
	if a > 9:
		return str(a)
	else:
		return '0' + str(a)
a = [int(x) for x in input().split(':')]
b = [int(x) for x in input().split(':')]
h = a[0] - b[0]
m = a[1] - b[1]
hh = 0
while m < 0:
	m = 60 - abs(m)
	hh += 1
h -= hh
while h < 0:
	h = 24 - abs(h)
print(ss(h), ':', ss(m), sep='')


s = list(map(int, input().split(':')))
t = list(map(int, input().split(':')))
time_to_bed = [s[0] - t[0], s[1] - t[1]]
if time_to_bed[1] < 0:
	time_to_bed[1] += 60
	time_to_bed[0] += -1
if time_to_bed[0] < 0:
	time_to_bed[0] += 24
if time_to_bed[0] // 10 == 0:
	time_to_bed[0] = '0' + str(time_to_bed[0])
if time_to_bed[1] // 10 == 0:
	time_to_bed[1] = '0' + str(time_to_bed[1])
print(*time_to_bed, sep=':')


def george_sleep(a, b):
	m1 = int(a[3:])
	m2 = int(b[3:])
	h1 = int(a[0:2])
	h2 = int(b[0:2])
	m = m1 - m2
	h = h1 - h2
	if h < 0 and m < 0:
		m = 60 + m
		h = h - 1
		if h < 0:
			h = 24 + h
	if m < 0:
		m = 60 + m
		h = h - 1
	if h < 0:
		h = h + 24
	h = str(h)
	m = str(m)
	if len(h) == 1:
		h = '0' + h
	print(h, end='')
	print(':', end='')
	if len(m) == 1:
		m = '0' + m
	print(m)
a = input('')
b = input('')
george_sleep(a, b)


tmp = input().split(':')
currhr = int(tmp[0])
currmin = int(tmp[1])
tmp = input().split(':')
takenhr = int(tmp[0])
takenmin = int(tmp[1])
if currmin < takenmin:
	currmin += 60
	currhr -= 1
tmp = int(currhr - takenhr + 24) % 24
s = ''
if tmp <= 9:
	s = '0'
s = s + str(tmp)
s = s + ':'
tmp = int(currmin - takenmin)
if tmp <= 9:
	s = s + '0'
s = s + str(tmp)
print(s)


def I():
	return map(int, input().split(':'))
(h, m) = I()
(dh, dm) = I()
(h, m) = (h - dh, m - dm)
(h, m) = ((h + m // 60) % 24, m % 60)
print(f'{h:02}:{m:02}')


import datetime
from datetime import timedelta
timeNow = input()
duration = input().split(':')
time_obj = datetime.datetime.strptime(timeNow, '%H:%M') - timedelta(hours=int(duration[0]), minutes=int(duration[1]))
time_obj = time_obj.time().strftime('%H:%M')
print(time_obj)


I = lambda : map(int, input().split(':'))
(h, m) = I()
(dh, dm) = I()
(h, m) = (h - dh, m - dm)
(h, m) = ((h + m // 60) % 24, m % 60)
print(f'{h:02}:{m:02}')


(h, m) = [int(x) for x in input().split(':')]
(hdiff, mdiff) = [int(x) for x in input().split(':')]
m1 = m - mdiff
h1 = h - hdiff
if m1 < 0:
	m1 = 60 + m1
	h1 = h1 - 1
if h1 < 0:
	h1 = 24 + h1
h1 = str(h1)
m1 = str(m1)
print(h1.zfill(2) + ':' + m1.zfill(2))


while True:
	current = input().split(':')
	duration = input().split(':')
	if len(current) == 2 and len(duration) == 2:
		break
jam = 0
menit = 0
jam = int(current[0]) - int(duration[0])
menit = int(current[1]) - int(duration[1])
if menit < 0:
	menit = 60 + menit
if int(duration[1]) + menit >= 60:
	jam -= 1
if jam < 0:
	jam = 24 + jam
if 0 <= jam < 10:
	jam = '0' + str(jam)
if 0 <= menit < 10:
	menit = '0' + str(menit)
print(str(jam) + ':' + str(menit))


(a, b) = map(int, input().split(':'))
(c, d) = map(int, input().split(':'))
(u, v) = (a * 60 + b, c * 60 + d)
t = (u - v) % 1440
(x, y) = (t // 60, t % 60)
x = '0' + str(x) if x < 10 else str(x)
y = '0' + str(y) if y < 10 else str(y)
print(x + ':' + y)


t1 = input().split(':')
t2 = input().split(':')
h1 = int(t1[0])
m1 = int(t1[1])
h2 = int(t2[0])
m2 = int(t2[1])
if h1 < h2 or (h1 == h2 and m1 < m2):
	h1 += 24
h1 = h1 - h2
m1 = m1 - m2
if m1 < 0:
	h1 -= 1
	m1 += 60
print('%02d:%02d' % (h1, m1))