#include <bits/stdc++.h>
using namespace std;

int main()
{
  int n;
  while( cin >> n, n ) {
    string s;
    cin >> s;
    int A[101], B[101];

    for(int i=0; i<n; i++) {
      int a, b;

      cin >> a >> b;
      a--; b--;
      A[i] = a;
      B[i] = b;
    }

    for(int i=n-1; i>=0; i--) {
      int a = A[i], b = B[i];
      int dif = abs(a - b);
      char tmp = s[a];
      s[a] = s[b];
      s[b] = tmp;
      for(int i=0; i<dif; i++) {
	if( s[a] == 'z' ) {
	  s[a] = 'a';
	} else s[a]++;

	if( s[b] == 'z' ) {
	  s[b] = 'a';
	} else s[b]++;
	
      }
    }

    cout << s << endl;
  }
}