s,t,u=input().split()
v=""
for i in range(len(s)):
  if str(i) not in (t,u):
    v+=s[i]
print(v)