for _ in range(int(input())): N = int(input()) x = 0 while N > 7: N //= 2 x ^= 1 if x == 1: print("sepa") else: print("ryota")