#include <cstdio>
#include <algorithm>

using namespace std;

class verylong {
public:
	int n;
	int a[10000];
	void operator=(const verylong &x) {
		n = x.n;
		for (int i = 0; i < n; ++i) {
			a[i] = x.a[i];
		}
	}
	void operator=(const char *x) {
		n = 0;
		while (x[n]) {
			a[n] = x[n] - '0';
			++n;
		}
		reverse(a, a + n);
		while (n && !x[n - 1]) --n;
	}
	void operator=(const int x) {
		n = 1;
		a[0] = x;
	}
	bool zero() const {
		return (n == 1) && !a[0];
	}
	bool operator==(const verylong &x) const {
		if (n != x.n) return false;
		for (int i = 0; i < n; ++i) {
			if (x.a[i] != a[i]) return false;
		}
		return true;
	}
	bool operator<(const verylong &x) const {
		if (n != x.n) return n < x.n;
		for (int i = n - 1; i >= 0; --i) {
			if (x.a[i] != a[i]) return a[i] < x.a[i];
		}
		return false;
	}
	void operator*=(const verylong &x) {
		verylong c;
		c.n = n + x.n;
		for (int i = 0; i < c.n; ++i) {
			c.a[i] = 0;
		}
		for (int i = 0; i < n; ++i) {
			for (int j = 0; j < x.n; ++j) {
				c.a[i + j] += a[i] * x.a[j];
			}
		}
		*this = c;
		for (int i = 0; i < n; ++i) {
			a[i + 1] += a[i] / 10;
			a[i] %= 10;
		}
		while (n && !a[n - 1]) --n;
	}
	void operator-=(const verylong &x) {
		for (int i = 0; i < n; ++i) {
			a[i] -= x.a[i];
			if (a[i] < 0) {
				a[i] += 10;
				--a[i + 1];
			}
		}
		while (n && !a[n - 1]) --n;
	}
	void divide() {
		int t = 0;
		for (int i = n - 1; i >= 0; --i) {
			t = t * 10 + a[i];
			a[i] = t >> 1;
			t &= 1;
		}
		while (n && !a[n - 1]) --n;
	}
	void print() {
		putchar(a[n - 1] + '0');
		for (int i = n - 2; i >= 0; --i) {
			putchar(a[i] + '0');
		}
		putchar('\n');
	}
};
char s[100000];
verylong x, y, q, r;

int main() {
freopen("G.in","r",stdin);
freopen("G.out","w",stdout);	
int n; scanf("%d", &n);
	scanf("%s", s);
	x = s;
	scanf("%s", s);
	y = s;
	putchar('t');
	r = 2;
	q = 1;
	while (n) {
		if (n & 1) {
			q *= r;
			--n;
		} else {
			r *= r;
			n >>= 1;
		}
	}
	while (!x.zero() && !y.zero() && !(x == q) && !(y == q)) {
		q.divide();
		if ((x == q) || (y == q)) break;
		if (x < q) {
			if (y < q) {
				putchar('t');
			} else {
				putchar('q');
				y -= q;
			}
		} else {
			x -= q;
			if (y < q) {
				putchar('s');
			} else {
				putchar('r');
				y -= q;
			}
		}
	}
	putchar('\n');
	return 0;
}