#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef vector <string> vs;

struct pos{
	int x;
	int y;
};

vs wx,wy;

int readdata(){
	string tmp;
	bool f=true;
	while (true){
		getline(cin,tmp);
		if (cin.eof()) break;
		if (f) wx.push_back(tmp);
		else wy.push_back(tmp);
		f = !f;
	}
	return 0;
}

bool ispath(pos p, int d){
	string c="";
	switch (d){
		case 0:
			if (p.y>0) c=wy[p.y-1][p.x];
			break;
		case 1:
			if (p.x<(int)wy.size()) c=wx[p.y][p.x];
			break;
		case 2:
			if (p.y<(int)wx[0].size()) c=wy[p.y][p.x];
			break;
		case 3:
			if (p.x>0) c=wx[p.y][p.x-1];
	};
	return c=="1";
}

int nextpath(pos p, int d0){
	const int N=4, dd[N]={3,0,1,2};
	int d = -1;
	for (int i=0; i<N; i++){
		d = (d0+dd[i])%4;
		if (ispath(p, d)) return d;
	}
	return d;
}

string f0037(){
	pos p;
	p.x=0; p.y=0;
	int dp=1, dx[4]={0,1,0,-1}, dy[4]={-1,0,1,0};
	string msg="", news="URDL";
	while (true){
		dp = nextpath(p, dp);
		p.x += dx[dp];
		p.y += dy[dp];
		msg += news[dp];
		if (p.x==0 && p.y==0) break;
	}
	return msg;
}

int main(void){
	readdata();
	cout<<f0037()<<endl;	
}