Small Change by MarkByers

while 1:a='-';b=map(int,raw_input().replace(':','').split());_={b[0]:a};exec"d={}\nfor e in b[1:]:\n for f in _:d[f-e]=_[f]+' '+`e`\n_=d\nif 0 in _:a=_[0][2:];_={}\n"*13;print a

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top