#!/usr/bin/env python3

import fileinput
import argparse
import sys

parser = argparse.ArgumentParser()
parser.add_argument('--delimiter', type=str, default='_')
args = parser.parse_args()
delimiter = args.delimiter

for line in fileinput.input("-"):
    prevToken = None
    tokens = line.split(" ") 
    if "Infinity" in tokens[0]:
        print("%s%s%s " % ("___DUMMY___", delimiter, "NN"))
        continue

    for token in tokens:
        if token[-1] == ')' and len(token) > 1:
            closingMarkerLocation = token.find(')')
            tokenName = token[0:closingMarkerLocation]
            print("%s%s%s " % (tokenName, delimiter, prevToken[1:]),end="")
        prevToken = token
    print()	
