S,t,u=raw_input().split();print "".join([S[i] for i in range(len(S)) if str(i) not in (t,u)])