s=input().split(',')

print((s[0],s[1],s[2]))
S = input().split(',')

print((' '.join(S)))

s = input().split(",")
print((s[0], s[1], s[2]))

S = input().split(",")
print((" ".join(S)))

-s = input().split(",") -print((s[0], s[1], s[2])) +S = input().split(",") +print((" ".join(S)))