s = eval(input())

ans = s.replace(',',' ')

print(ans)
s = eval(input())

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

s = eval(input())
print((s.replace(",", " ")))

-ans = s.replace(",", " ") -print(ans) +print((s.replace(",", " ")))