#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>
#include <sstream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <bitset>

#define rep(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define all(v) (v).begin(), (v).end()
#define rev(s) (s).rbegin(), (s).rend()
#define MP make_pair
#define X first
#define Y second

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> vi;

string sdir = "URDL";
int dx[] = {0, 0, 0, -1};
int dy[] = {-1, 0, 1, 0};

int main(){
	vector<string> v(9);

	rep(i, 9){
		cin >> v[i];
		v[i] += '0';
	}

	int x = 0, y = 0;
	int dir = 1;
	do{
		dir += 3;
		rep(i, 4){
			int ndir = (dir+i)%4;
			int nx = x + dx[ndir];
			int ny = y*2 + dy[ndir];
			if(nx < 0 || nx >= 5 ||ny < 0 || ny >= 9) continue;
			if(v[ny][nx] == '0') continue;
			x += dx[ndir]+(ndir==1);
			y += dy[ndir];
			dir = ndir;
			cout << sdir[ndir];
			break;
		}
	}while(x!=0||y!=0);

	cout << endl;
}