import re;print re.sub('(:0)+',':',':'.join(hex(int(x,16))[2:]for x in raw_input().split(':')),1).lstrip('0')