#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
using namespace std;

const int P = 1685440109;
const int MOD = 2000000087;

// ?????°???????????¨????????¶???????????????
class SegmentTree
{
private:
    typedef long long T1;
    typedef char T2;

    // ??????????????????????????\???????????¶?????????????????¨
    // uniteData(v, INIT_DATA) == v
    static const T1 INIT_DATA;
    // ?????¶?????????????????\???????????¶?????????????????¨
    // updateData(prev, size, INIT_DELAY) == prev
    // updateDelay(x, INIT_DELAY) == x
    static const T2 INIT_DELAY;

    // ?????????len???????????????????????????????¨??????????prev???????????????
    // ????????????????´???????????????????x?????¨????????´??°??????????????¨?????????????¨???????????????????
    T1 updateData(T1 prev, int len, T2 x){
        if(x == INIT_DELAY)
            return prev;
        else
            return x * pPowSum[len] % MOD;
    }
    // ???????????????x1,x2?????????2????????´??°????????????????????¨????????´??????????????????
    // ??????????????????????????????1????????´??°?????????????????????????????????
    T2 updateDelay(T2 x1, T2 x2){
        if(x2 == INIT_DELAY)
            return x1;
        else
            return x2;
    }
    // ?????????len???2????????????????¨??????????v1,v2???????????????
    // ??????2?????????????????±????????????????????????????¨???????????????????
    T1 uniteData(T1 v1, int len1, T1 v2, int len2){
        return (v1 + v2 * pPow[len1]) % MOD;
    }

    vector<long long> pPow, pPowSum;

    int n;
    vector<T1> data;
    vector<T2> delay;
    void updateTree(int a, int b, int k, int l, int r, T2 x){
        if(a <= l && r <= b){
            data[k] = updateData(data[k], r - l + 1, x);
            delay[k] = updateDelay(delay[k], x);
        }
        else if(a <= r && l <= b){
            int len = (r - l + 1) / 2;
            for(int i=0; i<2; ++i){
                data[k*2+1+i] = updateData(data[k*2+1+i], len, delay[k]);
                delay[k*2+1+i] = updateDelay(delay[k*2+1+i], delay[k]);
            }
            delay[k] = INIT_DELAY;
            updateTree(a, b, k*2+1, l, (l+r)/2, x);
            updateTree(a, b, k*2+2, (l+r+1)/2, r, x);
            data[k] = uniteData(data[k*2+1], len, data[k*2+2], len);
        }
    }
    T1 getValue(int a, int b, int k, int l, int r){
        if(a <= l && r <= b){
            return data[k];
        }
        else if(a <= r && l <= b){
            int len = (r - l + 1) / 2;
            for(int i=0; i<2; ++i){
                data[k*2+1+i] = updateData(data[k*2+1+i], len, delay[k]);
                delay[k*2+1+i] = updateDelay(delay[k*2+1+i], delay[k]);
            }
            delay[k] = INIT_DELAY;
            int len1 = max(0, min(b, (l+r)/2) - max(a, l) + 1);
            int len2 = max(0, min(b, r) - max(a, (l+r+1)/2) + 1);
            T1 v1 = getValue(a, b, k*2+1, l, (l+r)/2);
            T1 v2 = getValue(a, b, k*2+2, (l+r+1)/2, r);
            return uniteData(v1, len1, v2, len2);
        }
        else{
            return INIT_DATA;
        }
    }
public:
    SegmentTree(int n0){
        n = 1;
        while(n < n0)
            n *= 2;
        data.assign(2*n-1, INIT_DATA);
        delay.assign(2*n-1, INIT_DELAY);

        pPow.resize(n+1, 1);
        pPowSum.resize(n+1, 0);
        for(int i=1; i<=n; ++i){
            pPow[i] = pPow[i-1] * P % MOD;
            pPowSum[i] = pPowSum[i-1] + pPow[i-1];
        }
    }
    SegmentTree(const vector<T1>& v) : SegmentTree((int)v.size()){
        for(unsigned i=0; i<v.size(); ++i)
            data[n-1+i] = v[i];
        int k = n - 2;
        for(int len=2; len<=n; len*=2){
            for(int i=0; i<n/len; ++i){
                data[k] = uniteData(data[k*2+1], len/2, data[k*2+2], len/2);
                -- k;
            }
        }
    }
    // ??????[a,b]???????´???????????????????x???????????´??°??????????????¨
    void update(int a, int b, T2 x){
        updateTree(a, b, 0, 0, n-1, x);
    }
    // ??????[a,b]????¨???????????????????
    T1 get(int a, int b){
        return getValue(a, b, 0, 0, n-1);
    }
};
const SegmentTree::T1 SegmentTree::INIT_DATA = 0;
const SegmentTree::T2 SegmentTree::INIT_DELAY = '\0';

int main()
{
    int n;
    string u;
    cin >> n >> u;
    u = '-' + u;
    vector<long long> v(u.begin(), u.end());
    SegmentTree st(v);

    int q;
    cin >> q;
    while(--q >= 0){
        string query;
        cin >> query;

        if(query == "set"){
            int x, y;
            char z;
            cin >> x >> y >> z;
            st.update(x, y, z);
        }
        else{
            int a, b, c, d;
            cin >> a >> b >> c >> d;
            int len = min(b-a, d-c) + 1;

            int left = 0;
            int right = len;
            while(left < right){
                int mid = (left + right + 1) / 2;
                if(st.get(a, a+mid-1) == st.get(c, c+mid-1))
                    left = mid;
                else
                    right = mid - 1;
            }

            if(left == len){
                if(b - a < d - c)
                    cout << 's' << endl;
                else if(d - c < b - a)
                    cout << 't' << endl;
                else
                    cout << 'e' << endl;
            }
            else{
                if(st.get(a+left, a+left) < st.get(c+left, c+left))
                    cout << 's' << endl;
                else
                    cout << 't' << endl;
            }
        }
    }

    return 0;
}

Measured memory_bytes: 13640