#include "bits/stdc++.h" using namespace std; #define REP(i, n) for(int i=0; i<(n); i++) int N,M; string S; signed main() { cin >> S >> N >> M; if (N > M) { int tmp = N; N = M; M = tmp; } if (N == M) { S.erase(S.begin() + N); } else { S.erase(S.begin() + M); S.erase(S.begin() + N); } cout << S << endl; return 0; }