# coding: utf-8 char = list(input()) a, b = map(int, input().split()) char[a], char[b] = char[b], char[a] print(''.join(char))