a = input().split()
b = input()
del a[a.index(b)]
print(a)