a=[?0*6]
b=a.dup
5.times{|i|
  a<<?0+gets[0,4]+?0
  b<<(i<4?(?0+gets):?0*6)
}
c=[a,b]
x=2
y=d=1
print "R"
while x+y!=2
  case d
  when 1#R
  if c[1][y-1][x]==?1
    y-=1
    d=0
    print "U"
  elsif c[0][y][x]==?1
    x+=1
    d=1
    print "R"
  elsif c[1][y][x]==?1
    y+=1
    d=2
    print "D"
  elsif c[0][y][x-1]==?1
    x-=1
    d=3
    print "L"
  end
  when 2#D
  if c[0][y][x]==?1
    x+=1
    d=1
    print "R"
  elsif c[1][y][x]==?1
    y+=1
    d=2
    print "D"
  elsif c[0][y][x-1]==?1
    x-=1
    d=3
    print "L"
  elsif c[1][y-1][x]==?1
    y-=1
    d=0
    print "U"
  end
  when 3#L
  if c[1][y][x]==?1
    y+=1
    d=2
    print "D"
  elsif c[0][y][x-1]==?1
    x-=1
    d=3
    print "L"
  elsif c[1][y-1][x]==?1
    y-=1
    d=0
    print "U"
  elsif c[0][y][x]==?1
    x+=1
    d=1
    print "R"
  end
  when 0#U
  if c[0][y][x-1]==?1
    x-=1
    d=3
    print "L"
  elsif c[1][y-1][x]==?1
    y-=1
    d=0
    print "U"
  elsif c[0][y][x]==?1
    x+=1
    d=1
    print "R"
  elsif c[1][y][x]==?1
    y+=1
    d=2
    print "D"
  end
  end
end
puts""