while True:
try:
t, s = input().split()
h, m = map(int, t.split(':'))
print('{:02d}:{:02d}'.format((h+(m+int(s))//60)%24, (m+int(s))%60))
except EOFError:
break
while True:
try:
t, s = input().split()
h, m = map(int, t.split(':'))
print('{:02d}:{:02d}'.format((h+(m+int(s))//60)%24, (m+int(s))%60))
except EOFError:
break