# -*- coding: utf-8 -*- s = list(input()) i,j = map(int,input().split()) s[i],s[j] = s[j],s[i] s = "".join(s) print(s)