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

print((" ".join(s)))
print((*input().replace(","," ").split()))
s = list(input().split(","))
print((" ".join(s)))

print((*input().replace(",", " ").split()))

-s = list(input().split(",")) -print((" ".join(s))) +print((*input().replace(",", " ").split()))