for _ in range(int(input())): n = int(input()) k = 1 while k < n: k *= 14 k //= 14 if k < n <= 2 * k: print('ryota') else: print('sepa')