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