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