n = input(">>>") word = input(">>>") n = n.replace( ',', ' ') r = n.split() print(' '.join(filter(lambda x: x != word, r)))