str = input()
list = str.split(',')
print(list)
print(' '.join(list))