def RC(s, index): return s[:index] + s[index+1:] def TRC(s, index1, index2): return s[:index1] + s[index1+1:index2] + s[index2+1:] K = input().split() S, T, U = K[0], int(K[1]), int(K[2]) if T == U: print(RC(S, T)) else: if T > U: print(TRC(S, U, T)) else: print(TRC(S, T, U))