s = input().split(" ")
name = input()
lst = []
for i in s:
    lst.append(i)
lst.remove(name)
print(lst)