#include<iostream>
#include<cstdlib>

using namespace std;

string str;

void change(int a,int b){
  int diff = abs(a-b);
  for(int i = 0; i < diff; i++){
    if(str[a-1] == 'z') str[a-1] = 'a';
    else str[a-1]++;
    if(str[b-1] == 'z') str[b-1] = 'a';
    else str[b-1]++;
  }
  swap(str[a-1],str[b-1]);
}

int main(){
  int in;
  while(cin >> in && in){
    cin >> str;
    int a[in],b[in];
    for(int i = 0; i < in; i++) cin >> a[i] >> b[i];
    for(int i = in-1; i >= 0; i--) change(a[i],b[i]);
    cout << str << endl;
  }
  return 0;
}