s1, s2, s3 = input().split(',')

print((s1 + ' ' + s2 + ' ' + s3))
s = list(input().split(','))

print((' '.join(s)))
s1, s2, s3 = input().split(",")
print((s1 + " " + s2 + " " + s3))

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

-s1, s2, s3 = input().split(",") -print((s1 + " " + s2 + " " + s3)) +s = list(input().split(",")) +print((" ".join(s)))