import scala.io.StdIn.readLine
import scala.collection.mutable.ArrayBuffer

object Main {
  val DIRS = Array("R","D","L","U")
  val tox = Array(1,0,-1,0)
  val toy = Array(0,1,0,-1)

  def f(x:Int,y:Int,d:Int,v:Array[String],h:Array[String]):(Int,Int,Int,String) = {
    val path = d match {
          case 3 => v(y-1)(x)
          case 0 => h(y)(x)
          case 1 => v(y)(x)
          case 2 => h(y)(x-1)
          case _ => '0'
    }
    if(path == '1') (tox(d),toy(d),d,DIRS(d)) else f(x,y,(d+1)%4,v,h)
  }


  def getPath(x:Int,y:Int,d:Int,s:String,v:Array[String],h:Array[String]):String = {
    if(x==1 && y==1) s
    else {
      val (x2,y2,d2,s2) = f(x,y,(d+3)%4,v,h)
      getPath(x+x2,y+y2,d2,s+s2,v,h)
    }
  }

  def main(args:Array[String]) = {
    val v = new ArrayBuffer[String]
    val h = new ArrayBuffer[String]

    h += "0"*6; v += "0"*7
    for(i<-1 to 4) { h += "0"+readLine.trim+"0"; v += "0"+readLine.trim+"0" }
    h += "0"+readLine.trim+"0"
    v += "0"*7; h += "0"*6

    println(getPath(2,1,0,"R",v.toArray,h.toArray))
  }
}