for s in raw_input().split(';'):print''.join(s[int(c)]for c in s if":">c)