You are given the current time in 24-hour format hh:mm. Find and print the time after a minutes.

Note that you should find only the time after a minutes, see the examples to clarify the problem statement.

You can read more about 24-hour format here https://en.wikipedia.org/wiki/24-hour_clock.


-----Input-----

The first line contains the current time in the format hh:mm (0 ≤ hh < 24, 0 ≤ mm < 60). The hours and the minutes are given with two digits (the hours or the minutes less than 10 are given with the leading zeroes).

The second line contains integer a (0 ≤ a ≤ 10^4) — the number of the minutes passed.


-----Output-----

The only line should contain the time after a minutes in the format described in the input. Note that you should print exactly two digits for the hours and the minutes (add leading zeroes to the numbers if needed).

See the examples to check the input/output format.


-----Examples-----
Input
23:59
10

Output
00:09

Input
20:20
121

Output
22:21

Input
10:10
0

Output
10:10

Difficulty: interview

Starter code:

Solutions:
def main():
    a, b = map(int, input().split(":"))
    c = int(input())

    a += c // 60
    b += c % 60
    if b > 59:
        b %= 60
        a += 1

    aa = str(a % 24)
    if len(aa) < 2:
        aa = "0" + aa

    bb = str(b % 60)
    if len(bb) < 2:
        bb = "0" + bb

    print(aa + ":" + bb)

def __starting_point():
    main()
__starting_point()

import datetime
import time

t = input()
M = input()
h, m = list(map(int, t.split(':')))

H,M = divmod(int(M), 60)

a = datetime.datetime(100, 1, 1, h, m, 00)
b = a + datetime.timedelta(0,0,0,0,M,H,0)
print(b.strftime('%H:%M'))


h, m = [int(x) for x in input().split(':')]
a = int(input())
x = h * 60 + m + a
x = x % (60 * 24)

print(x // 600, x // 60 % 10, ':', x % 60 // 10, x % 60 % 10, sep='')


def solve():
    S = input()
    a = int(input())

    hh = int(S[:2])
    mm = int(S[3:])

    mm += a
    hh += mm // 60
    mm %= 60

    hh %= 24

    print('%02d:%02d' % (hh, mm))


def __starting_point():
    solve()

__starting_point()

s = input()
p = s.find(':')
h = int(s[:p])
m = int(s[p + 1:])
a = int(input())
m = m + 60 * h + a
m %= 1440
print('%02d:%02d' % (m // 60, m % 60))


hoursmin = input()
hours = int(hoursmin[:2])
minutes = int(hoursmin[3:])
a = int(input())
new_hours = str((hours * 60 + minutes + a) // 60 % 24)
new_minutes = str((hours * 60 + minutes + a) % 60)
if len(new_hours) == 1:
    new_hours = '0' + new_hours
if len(new_minutes) == 1:
    new_minutes = '0' + new_minutes
print('{}:{}'.format(new_hours, new_minutes))

h, m = map(int, input().split(':'))
after = int(input())


afm = (h * 60) + m + after
afm %= 24 * 60
print('%.2d:%.2d' % (afm // 60, afm % 60), sep='')

def inc(time):
    f = time[:2]
    m = time[2]
    s = time[3:]
    if s == '59':
        s = '00'
        if f == '23':
            f = '00'
            return f + m + s
        else:
            f = str(int(f) + 1)
            if len(f) == 1:
                f = '0' + f
            return f + m + s
    else:
        s = str(int(s) + 1)
        if len(s) == 1:
            s = '0' + s
        return f + m + s

time = input()
a = int(input())
for i in range(a):
    time = inc(time)
print(time)

h, m = map(int, input().split(':'))
a = int(input())
m += h * 60 + a
h = (m // 60) % 24
m %= 60
h, m = str(h), str(m)
if len(h) == 1:
    h = '0' + h
if len(m) == 1:
    m = '0' + m
print(h + ':' + m)

[h,m] = [int(x) for x in input().split(':')]
a = int(input())

newm = (m + a) % 60
newh = (h + ((m + a) // 60)) % 24

ans = ''
if (newm < 10 and newh < 10):
    ans = "0{}:0{}".format(newh, newm)
elif (newm < 10):
    ans = "{}:0{}".format(newh, newm)
elif (newh < 10):
    ans = "0{}:{}".format(newh, newm)
else:
    ans = "{}:{}".format(newh, newm)
print(ans)


__author__ = 'Utena'
time=list(map(int,input().split(':')))
n=int(input())
n=n+time[1]
time[0]=(n//60+time[0])%24
n=n%60
time[1]=n
print(str(time[0]).zfill(2)+':'+str(time[1]).zfill(2))

h,m=list(map(int,input().split(':')))
a=int(input())


h+=((m+a)//60)
m=(m+a)%60
h%=24

ms=""
hs=""
if(h<10):
    hs+="0"
if(m<10):
    ms+="0"
hs+=str(h)
ms+=str(m)
print("%s:%s"%(hs,ms))


3

(h, m) = tuple(map(int, input().split(':')))
a = int(input())

h = (h + (m+a)//60)%24
m = (m + a)%60

if h < 10:
	print("0" + str(h), end="")
else:
	print(str(h), end="")

print(":", end="")

if m < 10:
	print("0" + str(m), end="")
else:
	print(str(m), end="")


import sys

def norm(num):
	if num < 10:
		return '0' + str(num)
	else:
		return str(num)

h, m = [int(x) for x in input().split(':')]
diff = int(input())

hdiff = diff // 60
mdiff = diff % 60

mans = m + mdiff
hans = (h + hdiff) % 24
hans = (hans + 1) % 24 if mans >= 60 else hans
mans %= 60
s = norm(hans) + ':' + norm(mans)

print(s)


h,m=map(int,input().split(":"))
m+=int(input())
m+=h*60
m%=24*60
print("{:02}:{:02}".format(*divmod(m,60)))

s = input()
n = int(input())
h = int(s[0:2])
m = int(s[3:])


h += ((m + n) // 60)
h %= 24
m = (m + n) % 60
s = ''
if len(str(h)) < 2:
    s += '0'
s += str(h) + ':'
if len(str(m)) < 2:
    s += '0'
s += str(m)
print(s)


h, m = map(int, input().split(':'))
n = int(input())
m, h = (m + n) % 60, (h + (m+n) // 60) % 24
if h < 10:
	h = '0' + str(h)
if m < 10:
	m = '0' + str(m) 
print(h, m, sep = ':')

3

hh, mm = [int(i) for i in input().split(':')]
a = int(input())

mm += a

hh += mm // 60
mm %= 60
hh %= 24

print(str(hh).zfill(2) + ':' + str(mm).zfill(2))

# TODO: Leading zeroes


sLine = input()
sSplit = sLine.split(sep=':')
nHour = int(sSplit[0])
nMinute = int(sSplit[1])
nPass = int(input())
nPass = nPass % (60 * 24)
nMinute += nPass
if nMinute >= 60 :
	x = nMinute // 60
	nMinute -= 60 * x
	nHour += x
if nHour >= 24 :
	nHour %= 24
print('{0:02d}:{1:02d}'.format(nHour, nMinute))


def main():
    mode="filee"
    if mode=="file":f=open("test.txt","r")
    get = lambda :[int(x) for x in (f.readline() if mode=="file" else input()).split(":")]
    [h,m]=get()
    [n]=get()
    x = h * 60 + m
    x = (x + n) % 1440
    print(str(x//60).rjust(2, '0') + ":",end='')
    print(str(x % 60).rjust(2, '0'))
    
    if mode=="file":f.close()


def __starting_point():
    main()


__starting_point()

a = input()
h = int(a[0:2])
m = int(a[3:5])
n=int(input())
per = (m + n) // 60
m = (m+n) % 60
h = (h + per) % 24
if h < 10:
    print('0' + str(h) + ':', end = '')
else:
    print(str(h) + ':', end = '')
if m < 10:
    print('0' + str(m))
else:
    print(str(m))

ip=str(input())
h=int(ip[0]+ip[1])
m=int(ip[3]+ip[4])
k=h*60+m
n=int(input())
k+=n
h1=(k//60)%24
m1=k%60
if h1<10:
    h1='0'+str(h1)
if m1<10:
    m1='0'+str(m1)
print(h1,end=':')
print(m1)


import collections
import math

#n ,m = map(int, input().split())
t = list(input())
a = int(input()) % 1440
m = (a % 60 + int(t[3]) * 10 + int(t[4])) % 60
h = (a // 60 + (a % 60 + int(t[3]) * 10 + int(t[4])) // 60 + int(t[1]) + int(t[0]) * 10) % 24
print(''.join(str(x) for x in [h // 10, h % 10, ':', m // 10, m % 10]))

def __starting_point():

    hh,mm = map(int,input().split(sep=":"))
    a = int(input())

    hh += a//60
    mm += a%60

    hh += mm//60
    mm = mm%60

    hh = hh%24

    #print(hh,mm)

    strhh = "0"*(2-len(str(hh))) + str(hh)
    strmm = "0"*(2-len(str(mm))) + str(mm)
    print(strhh,":",strmm,sep="")
__starting_point()

h, m = map(int, input().split(':'))
v = 60 * h + m + int(input())
print('{:02}:{:02}'.format(v // 60 % 24, v % 60))