N=int(input()) seen=set() def F(): input() print("F") def B(): input() print("B") def L(): input() print("L") def R(): input() print("R") def solve(x,y): seen.add((x,y)) le=int(input()) print("F") if le and not (x+1,y) in seen: solve(x+1,y) B() L() le=int(input()) print("F") if le and not (x,y+1) in seen: solve(x,y+1) B() le=int(input()) print("F") if le and not (x-1,y) in seen: solve(x-1,y) B() le=int(input()) print("F") if le and not (x,y-1) in seen: solve(x,y-1) B() print("F") solve(0,0)