for z in input().split(';'):print(''.join(z[int(x)]for x in z if':'>x))