s,t,u=raw_input().split() print''.join(c for i,c in enumerate(s)if`i`not in[t,u])