for _ in range(int(input())): h, w = map(int, input().split()) if (h + w) & 1: print("sepa") else: print("ryota")