eolymp
bolt
Try our new interface for solving problems
Problems

Electric train

Electric train

We know how much time it takes for the train to travel between any two adjacent stations on the route. We know the time of departure from the initial station. Write a program that calculates the departure time from each station for electric train on its route (for the last station it will be the arrival time, and we ignore the station time for the train). \InputFile The first line contains the train departure time from the initial station. The time is given in the next format: the first two digits describe the hours (from \textbf{00} to \textbf{23}), then colon and two digits for minutes (from \textbf{00} to \textbf{59}). There is no blanks in the line with time. The second line gives the number of stations \textbf{n} (\textbf{2} ≤ \textbf{n} ≤ \textbf{1000}) on the route of electric train (including the initial and the final stations). Third line contains \textbf{n--1} numbers: the first number gives the time to travel from initial station to the second, the second number gives the time to travel from the second station to the third and so on. All these numbers are integers and no greater than \textbf{1000}. \OutputFile Print for each station the time when the train passes it. Print the time in format given in the input.
Time limit 1 second
Memory limit 64 MiB
Input example #1
07:00
4
10 5 3

Output example #1
07:00
07:10
07:15
07:18