#include<stdio.h>
char f[6][6],s[6],i,j,a,y,x,p,b;
int main()
{
	for(;i<9;++i,b=!b){
		scanf("%s",s);
		for(j=0;j<4+b;++j){
			a=s[j]-48;
			f[i/2][j]|=a<<1+b;
			f[i/2+b][j+!b]|=a<<3-b*3;
		}
	}
	do{
		while(!((f[y][x]>>(p=(p+1)%4))&1));
		putchar("URDL"[p]);
		x+=p?2-p:0;
		y+=p==3?0:p-1;
		p=(p+2)%4;
	}while(y|x|f[0][0]==6&p==3);
	return!puts(""); 
}