# import sys; input = lambda: sys.stdin.readline()

s = eval(input())

s = s.replace(",", " ")

print(s)
print((" ".join(map(str, input().split(",")))))
# import sys; input = lambda: sys.stdin.readline()
s = eval(input())
s = s.replace(",", " ")
print(s)

print((" ".join(map(str, input().split(",")))))

-# import sys; input = lambda: sys.stdin.readline() -s = eval(input()) -s = s.replace(",", " ") -print(s) +print((" ".join(map(str, input().split(",")))))