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