#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cstring>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <list>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <unordered_set>
#include <unordered_map>
#include <array>
#include <cassert>
#include <bitset>
using namespace std;
using LL = long long;

//????????????????????????????´?????????´?????????????????§???????????°??¨(RSQ???)
template<typename T>
class RSQ_modify {
private:
	vector<T> seg;//????????????
	int width;//?????°??¨??????(???????????§????????§????????????)
	vector<T>lazy;//?????¶?????????
	vector<bool>flag;//?????¶??????????????????
	function<T(const T&, const int&)>multi;//??????????????????(??°????????????????????¨?\¨)

	//k??????????????????[l,r)????????¶???????????????
	void eval(int k, int l, int r) {
		if (flag[k]) {
			seg[k] = multi(lazy[k], r - l);
			if (r - l > 1) {
				lazy[2 * k + 1] = lazy[k]; flag[2 * k + 1] = true;
				lazy[2 * k + 2] = lazy[k]; flag[2 * k + 2] = true;
			}
			lazy[k] = T();
			flag[k] = false;
		}
	}
	T query_raw(int a, int b, int l, int r, int k) {
		eval(k, l, r);
		if (b <= l || r <= a)return T();
		if (a <= l && r <= b)return seg[k];
		T vl = query_raw(a, b, l, (l + r) / 2, 2 * k + 1);
		T vr = query_raw(a, b, (l + r) / 2, r, 2 * k + 2);
		return vl + vr;
	}
	void update_raw(int a, int b, T x, int l, int r, int k) {
		eval(k, l, r);
		if (b <= l || r <= a)return;
		if (a <= l && r <= b) {
			lazy[k] = x;
			flag[k] = true;
			eval(k, l, r);
		}
		else {
			update_raw(a, b, x, l, (l + r) / 2, 2 * k + 1);
			update_raw(a, b, x, (l + r) / 2, r, 2 * k + 2);
			seg[k] = (seg[2 * k + 1] + seg[2 * k + 2]);
		}
	}
public:
	//?????????n?????????????????????def????????°??¨?????????
	RSQ_modify(int n, function<T(const T&, const int&)>mul)
		: multi(mul) {
		width = 1;
		while (width < n)width *= 2;
		seg.assign(width * 2 - 1, T());
		lazy.assign(seg.size(), T());
		flag.assign(seg.size(), false);
	}
	//??????[a,b)????????????????????????
	T query(int a, int b) { return query_raw(a, b, 0, width, 0); }
	//??????[a,b)???????§???????x???????????????
	void update(int a, int b, T x) { update_raw(a, b, x, 0, width, 0); }
	//???????????¨???????????????
	void init(const vector<T>&vec) {
		for (int i = 0; i < min(width, (int)vec.size()); i++)
			seg[i + width - 1] = vec[i];
		for (int i = width - 2; i >= 0; i--)
			seg[i] = seg[i * 2 + 1] + seg[i * 2 + 2];
		fill(lazy.begin(), lazy.end(), T());
		fill(flag.begin(), flag.end(), false);
	}
};

using ULL = unsigned long long;
ULL P = 1000000007;
ULL u_pow(ULL x, ULL n) {
	if (n == 0)return 1;
	ULL half = u_pow(x, n / 2);
	half *= half;
	if (n % 2)half *= x;
	return half;
}

int N, Q;
string U;

struct hasher {
	ULL val;//???????????\?????????
	int width;//??????????????§??????
	hasher() :val(0), width(0) {}
	hasher(char c) :val(c), width(1) {}
	hasher(ULL val, int width) :val(val), width(width) {}
	/*hasher operator+(const hasher& o)const {
		return hasher(
			val * u_pow(P, o.width) + o.val,
			width + o.width
		);
	}*/
};

hasher operator+(const hasher& lh, const hasher& rh) {
	return hasher(lh.val * u_pow(P, rh.width) + rh.val, lh.width + rh.width);
}

int main() {
	cin >> N;
	function<hasher(const hasher&, const int&)>multi = [&](const hasher& h, const int& x) {
		if (x == 0)return hasher();
		hasher half = multi(h, x / 2);
		half = half + half;
		if (x % 2)half = half + h;
		return half;
	};
	RSQ_modify<hasher>tree(N/*, [](const hasher&h) {
		assert(h.width % 2 == 0);
		ULL mid = u_pow(P, h.width / 2);
		return pair<hasher, hasher>(hasher(h.val / mid, h.width / 2), hasher(h.val%mid, h.width / 2));
	}, [](const hasher& h, const int& x) {
		assert(h.width == 1);
		return hasher(u_pow(h.val, x), x);*/,
		multi
	);
	cin >> U;
	vector<hasher>S;
	for (char s : U) {
		S.push_back(hasher(s));
	}
	tree.init(S);
	cin >> Q;
	for (int query = 0; query < Q; ++query) {
		string s;
		cin >> s;
		if (s == "set") {
			int x, y; char z;
			cin >> x >> y >> z;
			--x;
			tree.update(x, y, hasher(z));
		}
		else {
			int a, b, c, d;
			cin >> a >> b >> c >> d;
			--a; --c;
			int length = min(b - a, d - c);
			int lo = 0, hi = length;//lo????????? hi????????£?????????
			auto cond = [&](int x) {
				auto left = tree.query(a, a + x).val;
				auto right = tree.query(c, c + x).val;
				return left == right;
			};
			if (cond(hi)) {
				if (b - a > d - c) {
					cout << 't' << endl;
				}
				else if (b - a < d - c) {
					cout << 's' << endl;
				}
				else {
					cout << 'e' << endl;
				}
			}
			else {
				while (lo + 1 < hi) {
					int mid = (lo + hi) / 2;
					if (cond(mid)) {
						lo = mid;
					}
					else {
						hi = mid;
					}
				}
				char ss = tree.query(a + lo, a + lo + 1).val;
				char tt = tree.query(c + lo, c + lo + 1).val;
				if (ss < tt) {
					cout << 's' << endl;
				}
				else if (ss > tt) {
					cout << 't' << endl;
				}
				else {
					cout << 'e' << endl;
				}
			}
			//cout << left << " " << right << endl;
		}
	}
	return 0;
}

Measured memory_bytes: 23704