list=input().split()
name=input()
list.remove(name)
print(list)