s=input().split()    //分割产生列表
ss=input()            //要删除的人
s.remove(ss)            //删除
print(s)                //输出