import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random #sys.setrecursionlimit(10**9) #sys.set_int_max_str_digits(0) t = int(input()) #alist = list(map(int,input().split())) #alist = [] #s = input() #n,m = map(int,input().split()) #for i in range(n): # alist.append(list(map(int,input().split()))) def calc(x,n,turn): if x >= n: return turn else: a = [] for i in [2,3,5,7]: a.append(calc(x*i,n,turn^1)) if turn in a: return turn else: return turn^1 for i in range(t): n = int(input()) print('sepa' if calc(1,n,0) == 0 else 'ryota')