import sys

for l in sys.stdin:
    line = l.rstrip()
    tokens = line.split()
    result = []
    for token in tokens:
        items = token.split("|")
        print(items)
        result.append(items[0])
    print(" ".join(result))