#include<stdio.h>

int main(){
int N,M,i,j,p;
char s[100];
scanf("%d%d",&N,&M);

int m[N][M];
for(i=0;i<N;i++)
{for(j=0;j<M;j++)
   {scanf("%d",&m[i][j]);}
}
i=0;j=0,p=0;
while((i!=N-1)&&(j!=M-1))
{if((m[i][j+1]==1)&&(j<N-1))
{j++;
s[p]='R';
p++;
}
else if((m[i+1][j]==1)&&(i<N-1))
{i++;
s[p]='D';
p++;
}
else
{printf("no path found");
return 0;
}}
s[p]='\0';
printf("%s",s);
return 0;
}
