#!/usr/bin/env python3

# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.

import sys

if __name__ == "__main__":

    while True:
        linha = raw_input()
    
        if linha in '0':
            break
    
        temp = linha.split(" ")
        s = int(temp[0])
        num = int(temp[1])
                
        salas = []
        
        for x in range(s):
            salas.append(0)

        for x in range(num):
            linha = raw_input()
            n = int(linha)
            for y in range(0,s):
                if (y+1)%n==0:
                    if salas[y] == 0:
                        salas[y] = 1
                    else:
                        salas[y] = 0
                        
        for x in range(s):
            sys.stdout.write(["L","D"][salas[x]==0])
        
        print("")
            
    sys.exit()
