s = eval(input())

print((s.replace(',', ' ')))
S = input().split(',')

print((' '.join(S)))
s = eval(input())
print((s.replace(",", " ")))

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

-s = eval(input()) -print((s.replace(",", " "))) +S = input().split(",") +print((" ".join(S)))