#coding:utf-8 s,t,u = raw_input().split() print "".join(s[char] for char in range(les(s)) if str(char) not in (t,u))