using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using static System.Math;

namespace CSharpSpiral {
    class Program {
        static void Main(string[] args) {
            var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            Console.SetOut(sw);
            new Program().Solve(new ConsoleInput(Console.In, ' '));
            Console.Out.Flush();
        }
		public void Solve(ConsoleInput cin) {
			//NESW
			var walls = new bool[5, 5, 4];
			string line;
			for(int i = 0; i < 4; i++) {
				line = cin.ReadLine;
				for(int j = 0; j < 4; j++) {
					var isWall = line[j] == '1';
					walls[i, j + 1, 3] = walls[i, j, 1] = isWall;
				}
				line = cin.ReadLine;
				for(int j = 0; j < 5; j++) {
					var isWall = line[j] == '1';
					walls[i + 1, j, 0] = walls[i, j, 2] = isWall;
				}
			}
			line = cin.ReadLine;
			for(int j = 0; j < 4; j++) {
				var isWall = line[j] == '1';
				walls[4, j + 1, 3] = walls[4, j, 1] = isWall;
			}
			//start explore
			var dir = 1;
			int x = 0, y = 0;
			var sb = new StringBuilder();
			var dirChar = new char[] { 'U', 'R', 'D', 'L' };
			do {
				var next = nextDir(walls, x, y, dir);
				switch(next) {
					case 0: y--; break;
					case 1: x++; break;
					case 2: y++; break;
					case 3: x--; break;
				}
				dir = next;
				sb.Append(dirChar[next]);
			} while(x != 0 || y != 0);
			Console.WriteLine(sb.ToString());
			sb.Clear();
		}

		public int nextDir(bool[,,] walls, int x, int y, int prevDir) {
			var tmp = (prevDir - 1) & 3;
			for(int i = 0; i < 3; i++) {
				if(walls[y, x, tmp]) return tmp;
				tmp = (tmp + 1) & 3;
			}
			return tmp;
		}

	}
	static class ExtendClass {
		public static string Join<T>(this IEnumerable<T> X, string separator = " ") => string.Join(separator, X);
	}
	class ConsoleInput {
		private readonly TextReader _stream;
		private readonly char _separator = ' ';
		private readonly Queue<string> inputStream;
		public ConsoleInput(TextReader stream, char separator = ' ') {
			this._separator = separator;
			this._stream = stream;
			inputStream = new Queue<string>();
		}
		public string Read {
			get {
				if(inputStream.Count != 0) return inputStream.Dequeue();
				string[] tmp = _stream.ReadLine().Split(_separator);
				for(int i = 0; i < tmp.Length; ++i)
					inputStream.Enqueue(tmp[i]);
				return inputStream.Dequeue();
			}
		}
		public string ReadLine { get { return _stream.ReadLine(); } }
		public int ReadInt { get { return int.Parse(Read); } }
		public long ReadLong { get { return long.Parse(Read); } }
		public double ReadDouble { get { return double.Parse(Read); } }
		public string[] ReadStrArray(long N) {
			var ret = new string[N];
			for(long i = 0; i < N; ++i)
				ret[i] = Read;
			return ret;
		}
		public int[] ReadIntArray(long N) { var ret = new int[N]; for(long i = 0; i < N; ++i) ret[i] = ReadInt; return ret; }
		public long[] ReadLongArray(long N) { var ret = new long[N]; for(long i = 0; i < N; ++i) ret[i] = ReadLong; return ret; }
		public double[] ReadDoubleArray(long N) { var ret = new double[N]; for(long i = 0; i < N; ++i) ret[i] = ReadDouble; return ret; }
	}
}



Measured memory_bytes: 14176