problem

JOI Shoji manages the time spent at work by employees with a time card. When an employee arrives at the office, he / she uses a dedicated device to stamp the arrival time on the time card. When leaving the office after work, the time of leaving the office is stamped on the time card. The time is handled in a 24-hour clock.

For security reasons, employees arrive at work after 7 o'clock. In addition, all employees leave the company before 23:00. The employee leaving time is always after the time of arrival.

Create a program that calculates the time spent at work for each of the three JOI Shoji employees, Mr. A, Mr. B, and Mr. C, given the time of arrival and departure.



input

The input consists of 3 lines. Mr. A's arrival time and departure time are written on the first line, Mr. B's arrival time and departure time are written on the second line, and Mr. C's arrival time and departure time are separated by blanks on the third line. There is.

The time is written with three integers, each separated by a space. The three integers h, m, and s represent h hours, m minutes, and s seconds. 7 ≤ h ≤ 22, 0 ≤ m ≤ 59, 0 ≤ s ≤ 59.

output

Output Mr. A's time at work on the first line, Mr. B's time at work on the second line, and Mr. C's time at work on the third line.

If the output time is h hours, m minutes, and s seconds, output in the order of h, m, and s, separated by blanks.

Examples

Input

9 0 0 18 0 0
9 0 1 18 0 0
12 14 52 12 15 30


Output

9 0 0
8 59 59
0 0 38


Input

None


Output

None

Source: aizu | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
for i in range(3):
	L = list(map(int, input().split()))
	L0 = L[0] * 60 * 60 + L[1] * 60 + L[2]
	L1 = L[3] * 60 * 60 + L[4] * 60 + L[5]
	h = (L1 - L0) // (60 * 60)
	m = (L1 - L0) % (60 * 60) // 60
	s = (L1 - L0) % (60 * 60) % 60
	print(h, m, s)


(AH, AM, AS, AH2, AM2, AS2) = map(int, input().split())
(BH, BM, BS, BH2, BM2, BS2) = map(int, input().split())
(CH, CM, CS, CH2, CM2, CS2) = map(int, input().split())
A = AH2 * 3600 + AM2 * 60 + AS2 - AH * 3600 - AM * 60 - AS
B = BH2 * 3600 + BM2 * 60 + BS2 - BH * 3600 - BM * 60 - BS
C = CH2 * 3600 + CM2 * 60 + CS2 - CH * 3600 - CM * 60 - CS
print(A // 3600, A % 3600 // 60, A % 3600 % 60)
print(B // 3600, B % 3600 // 60, B % 3600 % 60)
print(C // 3600, C % 3600 // 60, C % 3600 % 60)


for _ in range(3):
	time = list(map(int, input().split()))
	if time[2] > time[5]:
		time[5] += 60
		time[4] -= 1
	if time[1] > time[4]:
		time[4] += 60
		time[3] -= 1
	hour = time[3] - time[0]
	minute = time[4] - time[1]
	second = time[5] - time[2]
	print(hour, minute, second)


def time():
	A = list(map(int, input().split()))
	shussha = A[:3]
	taisha = A[3:]
	sec = (taisha[2] + 60 - shussha[2]) % 60
	kurisagari_min = int(taisha[2] - shussha[2] < 0)
	min = (taisha[1] - kurisagari_min + 60 - shussha[1]) % 60
	kurisagari_hour = int(taisha[1] - kurisagari_min - shussha[1] < 0)
	hour = taisha[0] - kurisagari_hour - shussha[0]
	return str(hour) + ' ' + str(min) + ' ' + str(sec)
A = time()
B = time()
C = time()
print(A)
print(B)
print(C)


for _ in range(3):
	a = list(map(int, input().split()))
	wt = 3600 * (a[3] - a[0]) + 60 * (a[4] - a[1]) + a[5] - a[2]
	print('{0} {1} {2}'.format(wt // 3600, wt % 3600 // 60, wt % 3600 % 60))


from datetime import datetime as dt

def while_in_time(two_times):
	times = two_times.split()
	in_time_str = ' '.join(times[:3])
	out_time_str = ' '.join(times[3:])
	in_time = dt.strptime(in_time_str, '%H %M %S')
	out_time = dt.strptime(out_time_str, '%H %M %S')
	while_time = out_time - in_time
	seconds = while_time.seconds
	hour = seconds // 3600
	minute = seconds % 3600 // 60
	sec = seconds % 60
	str_while_time = '{} {} {}'.format(hour, minute, sec)
	return str_while_time
A_time = input()
B_time = input()
C_time = input()
print(while_in_time(A_time))
print(while_in_time(B_time))
print(while_in_time(C_time))


import sys
for e in sys.stdin:
	(a, b, c, d, e, f) = map(int, e.split())
	t = (d - a) * 3600 + (e - b) * 60 + f - c
	print(t // 3600, t // 60 % 60, t % 60)


for i in range(3):
	a = list(map(int, input().split()))
	for j in range(6):
		x = a[3] * 3600 + a[4] * 60 + a[5]
		y = a[0] * 3600 + a[1] * 60 + a[2]
		z = x - y
		h = z // 3600
		m = (z - h * 3600) // 60
		s = z - (h * 3600 + m * 60)
	print(h, m, s)


import datetime
for i in range(3):
	(h1, m1, s1, h2, m2, s2) = map(int, input().split())
	t_c = datetime.datetime(2019, 3, 7, h1, m1, s1)
	t_b = datetime.datetime(2019, 3, 7, h2, m2, s2)
	t_a = str(t_b - t_c)
	(ha, hb, hc) = map(int, t_a.split(':'))
	print(ha, hb, hc)


for _ in range(3):
	(h, m, s, _h, _m, _s) = map(int, input().split())
	start = h * 3600 + m * 60 + s
	end = _h * 3600 + _m * 60 + _s
	time = end - start
	hours = time // 3600
	minutes = time // 60 % 60
	seconds = time % 60
	print(hours, minutes, seconds)


import sys
arr = []
for line in sys.stdin:
	(h1, m1, s1, h2, m2, s2) = map(int, line.split())
	a1 = h1 * 3600 + m1 * 60 + s1
	a2 = h2 * 3600 + m2 * 60 + s2
	a3 = a2 - a1
	h3 = int(a3 / 3600)
	a3 -= h3 * 3600
	m3 = int(a3 / 60)
	s3 = a3 - m3 * 60
	print(h3, m3, s3)


def time(inp):
	(h1, m1, s1, h2, m2, s2) = inp
	s = s2 - s1
	if s < 0:
		s += 60
		m2 -= 1
	m = m2 - m1
	if m < 0:
		m += 60
		h2 -= 1
	h = h2 - h1
	print(h, m, s)
for i in range(3):
	time(tuple(map(int, input().split())))


for i in range(3):
	(A, B, C, D, E, F) = map(int, input().split())
	t = 3600 * (D - A) + 60 * (E - B) + (F - C)
	h = t // 3600
	t %= 3600
	m = t // 60
	t %= 60
	s = t % 60
	print(h, m, t)


for _ in range(3):
	(h1, m1, s1, h2, m2, s2) = map(int, input().split())
	t = h2 * 3600 + m2 * 60 + s2 - h1 * 3600 - m1 * 60 - s1
	print(t // 3600, t % 3600 // 60, t % 60)


for i in range(3):
	(h, m, s, nh, nm, ns) = map(int, input().split())
	t = nh * 3600 + nm * 60 + ns - (h * 3600 + m * 60 + s)
	h = t // 3600
	m = t % 3600 // 60
	s = t % 60
	print(h, m, s)


t = [list(map(int, input().split())) for _ in range(3)]
for i in range(3):
	r = t[i]
	if r[5] - r[2] >= 0:
		s = r[5] - r[2]
	else:
		s = 60 - (r[2] - r[5])
		r[4] -= 1
	if r[4] - r[1] >= 0:
		m = r[4] - r[1]
	else:
		m = 60 - (r[1] - r[4])
		r[3] -= 1
	h = r[3] - r[0]
	print(h, m, s)


import sys
(h1a, m1a, s1a, h2a, m2a, s2a) = map(int, input().split())
(h1b, m1b, s1b, h2b, m2b, s2b) = map(int, input().split())
(h1c, m1c, s1c, h2c, m2c, s2c) = map(int, input().split())
if s2a < s1a:
	sa = 60 + s2a - s1a
	m2a = m2a - 1
else:
	sa = s2a - s1a
if m2a < m1a:
	ma = 60 + m2a - m1a
	h2a = h2a - 1
else:
	ma = m2a - m1a
ha = h2a - h1a
if s2b < s1b:
	sb = 60 + s2b - s1b
	m2b = m2b - 1
else:
	sb = s2b - s1b
if m2b < m1b:
	mb = 60 + m2b - m1b
	h2b = h2b - 1
else:
	mb = m2b - m1b
hb = h2b - h1b
if s2c < s1c:
	sc = 60 + s2c - s1c
	m2c = m2c - 1
else:
	sc = s2c - s1c
if m2c < m1c:
	mc = 60 + m2c - m1c
	h2c = h2c - 1
else:
	mc = m2c - m1c
hc = h2c - h1c
print(str(ha) + ' ' + str(ma) + ' ' + str(sa))
print(str(hb) + ' ' + str(mb) + ' ' + str(sb))
print(str(hc) + ' ' + str(mc) + ' ' + str(sc))


def main():
	data = list(map(int, input().split()))
	a = data[:3]
	b = data[3:]
	ans = [0 for x in range(3)]
	t = b[2] - a[2]
	if t < 0:
		ans[2] = t + 60
		b[1] -= 1
	else:
		ans[2] = t
	t = b[1] - a[1]
	if t < 0:
		ans[1] = t + 60
		b[0] -= 1
	else:
		ans[1] = t
	ans[0] = b[0] - a[0]
	for a in ans[:-1]:
		print(a, end=' ')
	print(ans[-1])
for a in range(3):
	main()


for i in range(3):
	(h_s, m_s, s_s, h_e, m_e, s_e) = map(int, input().split())
	x = h_e * 3600 + m_e * 60 + s_e - h_s * 3600 - m_s * 60 - s_s
	h_a = x // 3600
	m_a = x % 3600 // 60
	s_a = x % 3600 % 60
	print(h_a, m_a, s_a)


for i in range(3):
	(h1, m1, s1, h2, m2, s2) = map(int, input().split())
	t = 3600 * h2 + 60 * m2 + s2 - (3600 * h1 + 60 * m1 + s1)
	print(t // 3600, t % 3600 // 60, t % 60)


for t in range(3):
	intlist = input().split(' ')
	int_list = [int(a) for a in intlist]
	h = int_list[3] - int_list[0]
	m = int_list[4] - int_list[1]
	s = int_list[5] - int_list[2]
	if s < 0:
		m -= 1
		s += 60
	if m < 0:
		h -= 1
		m += 60
	print(str(h) + ' ' + str(m) + ' ' + str(s))


for i in range(3):
	(h1, m1, s1, h2, m2, s2) = map(int, input().split())
	time = h2 * 3600 + m2 * 60 + s2 - h1 * 3600 - m1 * 60 - s1
	print(time // 3600, time // 60 % 60, time % 60)


time = [[int(s) for s in input().split()] for i in range(3)]
for t in time:
	t_in = 3600 * t[0] + 60 * t[1] + t[2]
	t_out = _in = 3600 * t[3] + 60 * t[4] + t[5]
	dur = t_out - t_in
	h = dur // 3600
	dur %= 3600
	m = dur // 60
	dur %= 60
	print(' '.join([str(e) for e in [h, m, dur]]))


for _ in range(3):
	t = list(map(int, input().split()))
	tt = (t[3] - t[0]) * 3600 + (t[4] - t[1]) * 60 + t[5] - t[2]
	(h, tt) = divmod(tt, 3600)
	(m, s) = divmod(tt, 60)
	print(h, m, s)


for i in range(3):
	x = list(map(int, input().split()))
	x0 = x[0] * 3600 + x[1] * 60 + x[2]
	x1 = x[3] * 3600 + x[4] * 60 + x[5]
	h = (x1 - x0) // 3600
	m = (x1 - x0) % 3600 // 60
	s = (x1 - x0) % 3600 % 60
	print(h, m, s)


print('0 0 1')
print('0 0 59')
print('15 59 59')


def sec(h, m, s):
	return 3600 * h + 60 * m + s

def hms(sec):
	return f'{sec // 3600} {sec // 60 % 60} {sec % 60}'
for i in range(3):
	(h, m, s, H, M, S) = map(int, input().split())
	print(hms(sec(H, M, S) - sec(h, m, s)))


import sys
while 1:
	try:
		(h1, m1, s1, h2, m2, s2) = map(int, input().split())
	except EOFError:
		break
	s1 = s2 + 60 - s1
	s2 = s1 % 60
	s1 = s1 / 60
	m1 = m2 + 60 - 1 - m1 + s1
	m2 = m1 % 60
	m1 = m1 / 60
	h2 = h2 - h1 - 1 + m1
	print('%d' % h2, '%d' % m2, '%d' % s2)


import sys
from sys import stdin
input = stdin.readline
from datetime import datetime, timedelta

def main(args):
	for _ in range(3):
		(hh1, mm1, ss1, hh2, mm2, ss2) = map(int, input().split())
		enter = datetime(2000, 1, 1, hour=hh1, minute=mm1, second=ss1)
		exit = datetime(2000, 1, 1, hour=hh2, minute=mm2, second=ss2)
		diff = exit - enter
		print(diff.seconds // 3600, diff.seconds % 3600 // 60, diff.seconds % 60)
main(sys.argv[1:])


import datetime
import sys
for line in sys.stdin:
	days = line.strip().split(' ')
	days = list(map(int, days))
	da = datetime.datetime(2016, 7, 11, days[0], days[1], days[2])
	db = datetime.datetime(2016, 7, 11, days[3], days[4], days[5])
	delta = str(db - da).split(':')
	delta = [str(int(v)) for v in delta]
	print(' '.join(delta))


(H_1, M_1, S_1, H_2, M_2, S_2) = (0, 0, 0, 0, 0, 0)
X = 0
for i in range(3):
	(H_1, M_1, S_1, H_2, M_2, S_2) = map(int, input().split())
	X = -(H_1 * 3600 + M_1 * 60 + S_1 - (H_2 * 3600 + M_2 * 60 + S_2))
	print(X // 3600, X // 60 % 60, X % 60)


def inputtebul():
	lit = []
	for unuse in range(1):
		lit = list(map(int, input().split()))
	return lit

def jikan(a):
	sy = a[0] * 3600 + a[1] * 60 + a[2]
	ty = a[3] * 3600 + a[4] * 60 + a[5]
	zy = ty - sy
	h = int(zy / 3600)
	m = int((zy - 3600 * h) / 60)
	s = int(zy - (3600 * h + 60 * m))
	n = str(h) + ' ' + str(m) + ' ' + str(s)
	return n
A = inputtebul()
B = inputtebul()
C = inputtebul()
print(jikan(A))
print(jikan(B))
print(jikan(C))


for i in range(3):
	l = list(map(int, input().split()))
	a = (l[3] - l[0]) * 3600 + (l[4] - l[1]) * 60 + l[5] - l[2]
	(h, a) = divmod(a, 3600)
	(m, s) = divmod(a, 60)
	print(h, m, s)