#include<iostream>
#include<iomanip>
#include<algorithm>
#include<array>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<numeric>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<unordered_map>
#include<queue>
#include<vector>
using namespace std;

//#define int long long
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;

#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(a) (a).begin(),(a).end()
#define dump(o) {cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) {cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL
const int MOD = 1e9 + 7;

int dx[] = { -1,0,1,0 };
int dy[] = { 0,-1,0,1 };
string LURD = "LURD";
bool M[16][16][4];

//????????¨??????????????????
int main() {
	rep(i, 0, 9) {
		if (i % 2) {
			rep(j, 0, 5) {
				char c; cin >> c;
				if (c == '1') {
					M[i / 2][j][3] = true;
					M[i / 2 + 1][j][1] = true;
				}
			}
		}
		else {
			rep(j, 0, 4) {
				char c; cin >> c;
				if (c == '1') {
					M[i / 2][j][2] = true;
					M[i / 2][j + 1][0] = true;
				}
			}
		}
	}
	int x = 0, y = 0, dir = 2, cnt = 0;
	do {
		rep(i, 0, 4) {
			//?????????????????????????£????????????????????????????????????????????????????????????????
			int dir2 = (dir + 3 + i) % 4;
			if (M[y][x][dir2]) {
				x += dx[dir2]; y += dy[dir2];
				dir = dir2;
				cout << LURD[dir2];
				break;
			}
		}
	} while (x || y);
	cout << endl;
	return 0;
}