using System;
using System.Collections.Generic;

namespace Volumen0
{
    class Program
    {
        static void Main()
        {
            string line;
            var x = 1;
            var y = 0;
            var isVert = true;

            var dir = 2;
            var list = new List<string>();
            while ((line = Console.ReadLine()) != null)
            {
                list.Add(line);
            }
            var vert = new string[list[0].Length + 1];
            var hori = new string[list[0].Length];
            var size = hori.Length;
            var tmpV = 0;
            var tmpH = 0;
            foreach (var v in list)
            {
                if (isVert)
                {
                    vert[tmpV++] = v;
                }
                else
                {
                    hori[tmpH++] = v;
                }
                isVert = !isVert;
            }


            do
            {
                if (dir == 0)
                {
                    if (0 < x && x <= size && 0 < y && vert[y - 1][x - 1] == '0' || x == 0)
                    {
                        dir = 1;
                        --y;
                    }
                    else if (0 < y && y <= size && 0 < x && hori[y - 1][x - 1] == '0' || y == 0 || y == size + 1)
                    {
                        dir = 0;
                        --x;
                        Console.Write("L");
                    }
                    else if (0 < x && x <= size && y <= size && vert[y][x - 1] == '0')
                    {
                        dir = 3;
                        ++y;
                        Console.Write("LD");
                    }
                    else
                    {
                        dir = 2;
                        ++x;
                        Console.Write("LDR");
                    }
                }
                else if (dir == 1)
                {
                    if (0 < y && y <= size && x <= size && hori[y - 1][x] == '0' || y == 0)
                    {
                        dir = 2;
                        ++x;
                    }
                    else if (0 < x && x <= size && 0 < y && vert[y - 1][x - 1] == '0' || x == 0 || x == size + 1)
                    {
                        dir = 1;
                        --y;
                        Console.Write("U");
                    }
                    else if (0 < y && y <= size && 0 < x && hori[y - 1][x - 1] == '0')
                    {
                        dir = 0;
                        --x;
                        Console.Write("UL");
                    }
                    else
                    {
                        dir = 3;
                        ++y;
                        Console.Write("ULD");
                    }
                }
                else if (dir == 2)
                {
                    if (0 < x && x <= size && y <= size && vert[y][x - 1] == '0' || x > size)
                    {
                        dir = 3;
                        ++y;
                    }
                    else if (0 < y && y <= size && x <= size && hori[y - 1][x] == '0' || y == 0 || y == size + 1)
                    {
                        dir = 2;
                        ++x;
                        Console.Write("R");
                    }
                    else if (0 < x && x <= size && 0 < y && vert[y - 1][x - 1] == '0')
                    {
                        dir = 1;
                        --y;
                        Console.Write("RU");
                    }
                    else
                    {
                        dir = 0;
                        --x;
                        Console.Write("RUL");
                    }
                }
                else if (dir == 3)
                {
                    if (0 < y && y <= size && 0 < x && hori[y - 1][x - 1] == '0' || y > size)
                    {
                        dir = 0;
                        --x;
                    }
                    else if (0 < x && x <= size && y <= size && vert[y][x - 1] == '0' || x == 0 || x == size + 1)
                    {
                        dir = 3;
                        ++y;
                        Console.Write("D");
                    }
                    else if (0 < y && y <= size && x <= size && hori[y - 1][x] == '0')
                    {
                        dir = 2;
                        ++x;
                        Console.Write("DR");
                    }
                    else
                    {
                        dir = 1;
                        --y;
                        Console.Write("DRU");
                    }
                }
            }
            while (x != 1 || y != 0);
            Console.WriteLine();
        }
    }
}


Measured memory_bytes: 13748