Margaret is good at maths. In her free time she tries to apply the principles of binary quantum refraction to time travel. She encodes a time of day in binary and adds a non negative time difference δ to it, hoping to create a singularity in the fabric of space and time that lets a traveller jump δ into the future.
A time of day is usually written in the 24 hour format, for example 03:14:15. There are several ways to write a time in binary. This problem uses the one below.

Figure 1. The binary clock format of the time 03:14:15.
One 4×6 matrix holds one time of day. Each of the six decimal digits of the 24 hour format is encoded separately in 4 bits, written down a single column with the most significant bit on top and the least significant bit at the bottom. For example the decimal digit 3 is 0011 in 4 bit binary, because (0×23)+(0×22)+(1×21)+(1×20)=3.
Given a time of day T and a time difference δ, both in the binary clock format, compute the time of day T+δ. The result is again a time of day, so a sum that reaches 24 hours continues from 00:00:00.
The input has 8 lines. Each line holds 6 bits separated by single spaces. The first 4 lines are the binary clock matrix of the time of day T, and the next 4 lines are the matrix of the time difference δ. Both matrices encode a valid time from 00:00:00 to 23:59:59 inclusive. Time is treated naively here: time zones, leap seconds and daylight saving shifts are ignored.
Print the time T+δ in the 4×6 binary clock format: 4 lines, each holding 6 bits separated by single spaces. If the sum reaches or passes 24 hours, subtract 24 hours until the result is a time of day from 00:00:00 to 23:59:59. End the last line with a newline.