import java.util.Scanner; public class Main { public static void main(String[] args){ new Main(); } public Main(){ Scanner sc = new Scanner(System.in); StringBuilder s = new StringBuilder(sc.next()); int t = sc.nextInt(); int u = sc.nextInt(); if(t==u) s = s.deleteCharAt(t); else s = s.deleteCharAt(Math.max(t, u)).deleteCharAt(Math.min(t,u)); System.out.println(s.toString()); } private void solve(){ } }