#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i,s,e) for(i64 (i) = (s);(i) < (e);(i)++)
#define all(x) x.begin(),x.end()
#define let auto const

struct tt {
  i64 val;
  i64 base;
};

struct lazy_segment_tree {
  using T = tt;
  using L = i64;
  const i64 mod = 1e9 + 7;
  const i64 base = 9973;
  T t_ide() { return { 0, 1 }; }
  L l_ide() { return 0; }
  T ope(const T& a, const T& b) {
    return { (a.val * b.base + b.val) % mod, a.base * b.base % mod };
  }
  L lazy_ope(const L& a, const L& b) { return b; }
  T effect(const T& t, const L& l, const i64 len) { return { l * bsum[len] % mod, t.base }; }

  i64 n;
  vector<T> node;
  vector<L> lazy;
  vector<bool> flag;
  vector<i64> bsum;

  /* create lazy_segment_tree for sequence [t_ide; sz]A */
  lazy_segment_tree(std::vector<i64> init) {
    n = 1;
    while(n < init.size()) n *= 2;
    node.assign(n * 2, t_ide());
    lazy.assign(n * 2, l_ide());
    flag.assign(n * 2, false);
    for(int i = 0;i < init.size();i++) node[i + n - 1] = { init[i], base };
    for(int i = n - 2;i >= 0;i--) {
      node[i] = ope(node[i * 2 + 1], node[i * 2 + 2]);
    }
    bsum.assign(n + 1, 0);
    for(int i = 1;i <= n;i++) bsum[i] = (bsum[i - 1] * base + 1) % mod;
  }
  

  void eval(i64 l, i64 r, i64 k) {
    if(flag[k]) {
      node[k] = effect(node[k], lazy[k], r - l);
      
      if(r - l > 1) {
        lazy[k * 2 + 1] = lazy_ope(lazy[k * 2 + 1], lazy[k]);
        flag[k * 2 + 1] = true;
        lazy[k * 2 + 2] = lazy_ope(lazy[k * 2 + 2], lazy[k]);
        flag[k * 2 + 2] = true;
      }

      flag[k] = false;
      lazy[k] = l_ide();
    }
  }
  
  /* for i in [a, b) effect(a[i], lx) */
  void update(i64 a, i64 b, L lx, i64 l = 0, i64 r = -1, i64 k = 0) {
    if(r < 0) r = n;
    eval(l, r, k);
    if(b <= l || r <= a) return;
    else if(a <= l && r <= b) {
      lazy[k] = lazy_ope(lazy[k], lx);
      flag[k] = true;
      eval(l, r, k);
    }
    else {
      update(a, b, lx, l, (l + r) / 2, k * 2 + 1);
      update(a, b, lx, (l + r) / 2, r, k * 2 + 2);
      node[k] =ope(node[k * 2 + 1], node[k * 2 + 2]);
    }
  }
  
  /* the sum of a[i] for i in [a, b) */
  T get(i64 a, i64 b, i64 l = 0, i64 r = -1, i64 k = 0) {
    if(r < 0) r = n;
    eval(l, r, k);
    if(b <= l || r <= a) return t_ide();
    else if(a <= l && r <= b) return node[k];
    else return ope(get(a, b, l, (l + r) / 2, k * 2 + 1), get(a, b, (l + r) / 2, r, k * 2 + 2));
  }
};

int main() {
  i64 N;
  cin >> N;
  string U;
  cin >> U;
  vector<i64> u(N);
  rep(i,0,N) u[i] = (i64)(U[i] - 'a');

  lazy_segment_tree seg(u);
  i64 Q;
  cin >> Q;

  rep(q,0,Q) {
    string que;
    cin >> que;
    if(que == "set") {
      i64 x, y;
      char z;
      cin >> x >> y >> z;
      seg.update(x - 1, y, (i64)(z - 'a'));
    }
    else {
      i64 a, b, c, d;
      cin >> a >> b >> c >> d;
      a--;
      c--;
      i64 OK = 0;
      i64 NG = min(b - a, d - c) + 1;
      while(NG - OK > 1) {
        i64 mid = (OK + NG) / 2;
        //cout << mid << endl;
        //cout << a << " " << a + mid << " = " << seg.get(a, a + mid).val << endl;
        //cout << c << " " << c + mid << " = " << seg.get(c , c + mid).val << endl;
        if(seg.get(a, a + mid).val == seg.get(c, c + mid).val) {
          OK = mid;
        }
        else {
          NG = mid;
        }
      }
      if(a + OK == b && c + OK == d) {
        cout << "e" << endl;
      }
      else if(a + OK == b) {
        cout << "s" << endl;
      }
      else if(c + OK == d) {
        cout << "t" << endl;
      }
      else if(seg.get(a + OK, a + OK + 1).val < seg.get(c + OK, c + OK + 1).val) {
        cout << "s" << endl;
      }
      else {
        cout << "t" << endl;
      }
    }
  }
}



Measured memory_bytes: 20684