#include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back


char hiki(int ch,int diff){
   
    ch+=diff;
    while(ch>(int)'z'){
        ch-=26;
    }
   
   
    return ch;
}


string solve(string s,int a,int b){
    int diff=abs(b-a);
   
    int xx=s[a];
    s[a]=s[b];
    s[b]=xx;
   
    s[a]=hiki(s[a],diff);
    s[b]=hiki(s[b],diff);
   
    return s;
}

int main() {
    int n;
    while(cin>>n){
        if(n==0)break;
        string s;
        cin>>s;
       
       
        stack<pii> a;
        rep(i,n){
            int x,y;
            cin>>x>>y;
            x--;
            y--;
            a.push(pii(x,y));
        }
       
        while(a.size()){
            s=solve(s,a.top().first,a.top().second);
            a.pop();

        }
        cout<<s<<endl;
    }
   
   
    return 0;
}