import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { char[] ar = sc.next().toCharArray(); ar[sc.nextInt()] = '-'; ar[sc.nextInt()] = '-'; System.out.println(String.valueOf(ar).replace("-","")); } }