from math import ceil T = int(input()) numbers = [int(input()) for _ in range(T)] for N in numbers: win = ceil(N/2) flag = True now = win while now > 1: if flag: now = ceil(now/2) else: now = ceil(now/7) if now == 1: break flag = not flag print("ryota" if flag else "sepa")