using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AOJ
{
    class Program
    {
        static void Main(string[] args)
        {
            string s;
            var list = new List<string>();

            while ((s = Console.ReadLine()) != null)
            {
                list.Add(s);
            }
            var vart = new string[list[0].Length+1];
            var cerl = new string[list[0].Length];
            var vc = 0;
            var cc = 0;

            var size = cerl.Length;

            var x = 1;
            var y = 0;

            var isVertical = true;
            foreach (var str in list)
            {
                if (isVertical)
                {
                    vart[vc++] = str;
                }
                else
                {
                    cerl[cc++] = str;
                }
                isVertical = !isVertical;
            }

            var d = 2;

            do
            {
                switch (d)
                {
                    case 0: //L
                        //上を調べる
                        if (0 < x && x <= size && 0 < y && vart[y - 1][x - 1] == '0' || x == 0)
                        {
                            d = 1; y--; //上移動
                        }
                        else //左
                            if (0 < y && y <= size && 0 < x && cerl[y - 1][x - 1] == '0' || y == 0 || y == size + 1)
                            {
                                d = 0; x--; Console.Write("L");
                            }
                            else
                                if (0 < x && x <= size && y <= size && vart[y][x - 1] == '0')
                                {
                                    d = 3; y++; Console.Write("LD");
                                }
                                else
                                {
                                    d = 2; x++; Console.Write("LDR");
                                }
                        break;
                    case 1: //U
                        //右を調べる
                        if (0 < y && y <= size && x <= size && cerl[y - 1][x] == '0' || y == 0)
                        {
                            d = 2; x++;
                        }
                        else //上
                            if (0 < x && x <= size && 0 < y && vart[y - 1][x - 1] == '0' || x == 0 || x == size+1)
                            {
                                d = 1; y--;  Console.Write("U");
                            }
                            else //左
                                if (0 < y && y <= size && 0 < x && cerl[y - 1][x - 1] == '0')
                                {
                                    d = 0; x--; Console.Write("UL");
                                }
                                else
                                {
                                    d = 3; y++; Console.Write("ULD");
                                }
                        break;
                    case 2: //R
                        //下を調べる
                        if (0 < x && x <= size && y <= size && vart[y][x - 1] == '0' || x > size)
                        {
                            d = 3; y++;
                        }
                        else //下が開いていない
                        //右を調べる
                        if(0 < y && y <= size && x <= size && cerl[y-1][x] == '0' || y == 0 || y == size+1)
                        {
                            d = 2; x++; Console.Write("R");
                        }
                        else //右が開いていない
                        //上を調べる
                            if (0 < x && x <= size && 0 < y && vart[y - 1][x - 1] == '0')
                            {
                                d = 1; y--; Console.Write("RU");
                            }
                            else
                            {
                                d = 0; x--; Console.Write("RUL");
                            }
                        break;
                    case 3: //D
                        //左を調べる
                        if (0 < y && y <= size && 0 < x && cerl[y - 1][x - 1] == '0' || y > size)
                        {
                            d = 0; x--;
                        }
                        else //下
                            if (0 < x && x <= size && y <= size && vart[y][x - 1] == '0' || x == 0 || x == size+1)
                            {
                                d = 3; y++; Console.Write("D");
                            }
                            else //右
                                if (0 < y && y <= size && x <= size && cerl[y - 1][x] == '0')
                                {
                                    d = 2; x++; Console.Write("DR");
                                }
                                else
                                {
                                    d = 1; y--; Console.Write("DRU");
                                }
                                
                        break;
                }
            }
            while (x != 1 || y != 0);

            Console.WriteLine();
        }
    }
}

Measured memory_bytes: 5356