
//Bismillahir Rahmanir Raheem
#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int>pii;
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;
#define sf(x) scanf("%d",&x)
#define sfl(x) scanf("%lld",&x)
#define lli long long int
#define ll64 int64_t
#define pb push_back
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define frr(i,a) for(int i=0;i<a;i++)
#define frl(i,a) for(lli i=0;i<a;i++)
#define fr1(i,a) for(int i=1;i<=a;i++)
#define iter(x)  x.begin(),x.end()
#define Memset(a,x,n) for(int i=0;i<n;i++)a[i]=x;
#define fi first
#define si second
//std::string s=std::bitset<M>(n).to_string();  //number to binary string
//lower_bound returns an iterator pointing to the first element in the range [first,last) which has a value not less than ‘val’.
//upper_bound returns an iterator pointing to the first element in the range [first,last) which has a value greater than ‘val’.
typedef pair<lli,lli>pll;
int main()
{
    lli a,b,c;
    cin>>a>>b>>c;
    if((a*a+b*b)<(c*c))
    {
        cout<<"Yes"<<endl;
    }
    else{ cout<<"No"<<endl;
    }
}

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,n1,n2) for(int i=(int)(n1); i<(int)(n2); ++i)
#define REP(i,n)     for(int i=0        ; i<(int)(n) ; ++i)
using llint = long long int;
const double EPS = 1e-9;
// debug
#ifdef _DEBUG
#define _GLIBCXX_DEBUG
#define DEBUG(x) cout << '(' << __LINE__ << ") " << #x << ": " << x << endl;
#else
#define DEBUG(x)
#endif

int main() {
  int n,q;
  string s,s1,s2;
  cin >> n;
  cin >> s;
  cin >> q;
  s1=s.substr(0,n);
  s2=s.substr(n);

  int t, a, b;
  REP(i,q) {
    cin >> t >> a >> b;
    if(t==1) {
      if(a>n) swap(s2[a-1-n],s2[b-1-n]);
      else if(b<=n) swap(s1[a-1],s1[b-1]);
      else swap(s1[a-1],s2[b-1-n]);
    }
    else swap(s1,s2);
  }

  cout << s1+s2 << "\n";

}

// end
