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