n=int(input()) while 1: print("D") if int(input())==0: break print("R") if int(input())==0: break