/* template.cpp {{{ */
#include <bits/stdc++.h>
using namespace std;
#define get_macro(a, b, c, d, name, ...) name
#define rep(...) get_macro(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define rrep(...) get_macro(__VA_ARGS__, rrep4, rrep3, rrep2, rrep1)(__VA_ARGS__)
#define rep1(n) rep2(i_, n)
#define rep2(i, n) rep3(i, 0, n)
#define rep3(i, a, b) rep4(i, a, b, 1)
#define rep4(i, a, b, s) for (ll i = (a); i < (ll)(b); i += (ll)(s))
#define rrep1(n) rrep2(i_, n)
#define rrep2(i, n) rrep3(i, 0, n)
#define rrep3(i, a, b) rrep4(i, a, b, 1)
#define rrep4(i, a, b, s) for (ll i = (ll)(b) - 1; i >= (ll)(a); i -= (ll)(s))
#define each(x, c) for (auto &&x : c)
#define fs first
#define sc second
#define all(c) begin(c), end(c)
using ui = unsigned;
using ll = long long;
using ul = unsigned long long;
using ld = long double;
const int inf = 1e9 + 10;
const ll inf_ll = 1e18 + 10;
const ll mod = 1e9 + 7;
const ll mod9 = 1e9 + 9;
const int dx[]{-1, 0, 1, 0, -1, 1, 1, -1};
const int dy[]{0, -1, 0, 1, -1, -1, 1, 1};
template<class T, class U> void chmin(T &x, const U &y){ x = min<T>(x, y); }
template<class T, class U> void chmax(T &x, const U &y){ x = max<T>(x, y); }
//struct prepare_ { prepare_(){ cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(12); } } prepare__;
/* }}} */

const int W = 18;
const int N = 1 << W;
const ul B = 114514;
const ul M = 1000000009;

int n, q;
string s;

ul h[256][W + 1];
ul pw[N + 1];
ul seg[N * 2 - 1];
char lazy[N * 2 - 1];

inline void eval(int k, int w){
  if (lazy[k]){
    seg[k] = h[lazy[k]][w];
    if (w > 0){
      lazy[k * 2 + 1] = lazy[k];
      lazy[k * 2 + 2] = lazy[k];
    }
    lazy[k] = '\0';
  }
}

inline void update(int l, int r, char c, int k = 0, int a = 0, int b = N, int w = W){
  eval(k, w);
  if (r <= a || b <= l) return;
  if (l <= a && b <= r){
    lazy[k] = c;
    eval(k, w);
    return;
  }
  int m = (a + b) / 2;
  update(l, r, c, k * 2 + 1, a, m, w - 1);
  update(l, r, c, k * 2 + 2, m, b, w - 1);
  seg[k] = (seg[k * 2 + 1] * pw[1 << (w - 1)] % M + seg[k * 2 + 2]) % M;
}

inline pair<ul, int> query(int l, int r, int k = 0, int a = 0, int b = N, int w = W){
  eval(k, w);
  if (r <= a || b <= l) return {0, 0};
  if (l <= a && b <= r) return {seg[k], 1 << w};
  int m = (a + b) / 2;
  auto vl = query(l, r, k * 2 + 1, a, m, w - 1);
  auto vr = query(l, r, k * 2 + 2, m, b, w - 1);
  seg[k] = (seg[k * 2 + 1] * pw[1 << (w - 1)] % M + seg[k * 2 + 2]) % M;
  return {(vl.first * pw[vr.second] % M + vr.first) % M, vl.second + vr.second};
}

inline int compare(int l1, int r1, int l2, int r2){
  int lb = 0, ub = min(r1 - l1, r2 - l2) + 1;
  while (ub - lb > 1){
    int md = (lb + ub) / 2;
    ul vl = query(l1, l1 + md).first;
    ul vr = query(l2, l2 + md).first;
    (vl == vr ? lb : ub) = md;
  }
  ul cl = lb < r1 - l1 ? query(l1 + lb, l1 + lb + 1).first : 0;
  ul cr = lb < r2 - l2 ? query(l2 + lb, l2 + lb + 1).first : 0;
  if (cl < cr) return -1;
  if (cl == cr) return 0;
  return 1;
}

int main(){
  pw[0] = 1;
  rep(i, N) pw[i + 1] = pw[i] * B % M;
  rep(c, 'a', 'z' + 1){
    h[c][0] = c;
    rep(i, W) h[c][i + 1] = (h[c][i] * pw[1 << i] % M + h[c][i]) % M;
  }
  
  cin >> n >> s >> q;
  rep(i, n) update(i, i + 1, s[i]);
  rep(q){
    string com;
    cin >> com;
    if (com == "set"){
      int x, y;
      char z;
      cin >> x >> y >> z, x--;
      update(x, y, z);
    }
    else {
      int a, b, c, d;
      cin >> a >> b >> c >> d, a--, c--;
      int v = compare(a, b, c, d);
      if (v == -1) cout << "s\n";
      else if (v == 0) cout << "e\n";
      else cout << "t\n";
    }
  }
}

Measured memory_bytes: 8868