# Add or remove imports
from easyinput import read_line,read

# Change 'function_name' to your function name,
# and addapt the way input must be read to your needs.
x,y = read(str,str)
while x is not None:
    ws = read_line().split()
    print(replace(ws,x,y))
    x,y = read(str,str)
