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

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(x) x.begin(),x.end()
const int mod=1e9+7;
const int N=3e5+9;

void solve()
{
    int n;
    cin >> n;
    string s;
    cin >> s;
    int k;
    cin >> k;
    int c = 0;
    while(k--)
    {
        int t, a, b;
        cin >> t >> a >> b;
        if(t==2) {c++; continue;}
        if( c % 2 == 0) 
        {
            swap(s[a-1],s[b-1]);
            continue;
        }

        if(a <= n && b > n)
        {
            a += n;
            b -= n;
            swap(s[a-1],s[b-1]);
            continue;
        }

        if(b <= n)
        {
            a += n;
            b += n;
            swap(s[a-1],s[b-1]);
            continue;
        }
        if(a > n)
        {
            a -= n;
            b -= n;
            swap(s[a-1],s[b-1]);
            continue;
        }
    }
    if(c%2==0) {cout << s << endl;return;}
    for(int i = n; i < 2 * n; i++) cout<<s[i];
    for(int i = 0; i < n; i++) cout << s[i]; cout << endl;
}

int main()
{
    IOS;
    int t = 1;
    //cin >> t;
    while(t--) solve();

    return 0;
}
// This is the start Shubham template//
#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long int
#define mp(a,b) make_pair(a,b)
#define ff first
#define ss second
#define mod 1000000007
#define deg(x) cout<<#x<<" = "<<x<<endl;
#define INF LONG_LONG_MAX
#define vll vector<int>
#define pb push_back
#define pll pair<int,int>
void input(){
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
#endif
}
#define cases int t; cin>>t; while(t--)
#define array(a,n) vll a(n); rep(i,0,n) cin>>a[i];
#define all(x) x.begin(),x.end()
#define printall(a) rep(i,0,a.size()) cout<<a[i]<<" "; cout<<endl;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)

//Hers's the end of shubham template
void solve();
int lcm (int a,int b);
int power(int a,int n);

int lcm (int a,int b)
{
  return a*b/(__gcd(a,b));
}
int power(int a,int n )
{
  if(n==0)
    return 1;
  if(n%2)
    return (a*power((a*a)%mod,n/2))%mod;
  return power((a*a)%mod,n/2);
}
int Pow(int a,int n )
{
  // cout<<"HI";
  if(n==0)
    return 1;
  if(n%2)
    return (a*power((a*a),n/2));
  return a*power((a*a),n/2);

}
int primes[1000010]={};
void seive()
{
  for(int i = 3;i*i<=1000000;i++)
  {
    if(!primes[i])
    {
      for(int j = i*i;j<=1000000;j+=i)
        primes[i] = 1;
    }
  }
  primes[0] = primes[1] = 1;

}



int32_t main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  input();

 
 int test;
 test = 1;
 while(test--)
 {
 	int a,b,c;
 	cin>>a>>b>>c;

// 10 10 10
 	if(a*a+b*b<c*c)
 	{
 		cout<<"Yes\n";
 	}
 	else
 		cout<<"No\n";
 	
 }	
}






