def solve(y, x, way)
  if y==0&&x==0 then
    print 'L'
    return
  end
  if y==1&&x==0&&way==2 then
    print 'U'
    return
  end
  if way==1 then
    print 'R'
    if y>0&& $d[y-1][x+1]=='1' then
      solve(y-1,x+1,2)
    elsif x<4&& $d[y][x+1]=='1' then
      solve(y,x+1,1)
    elsif y<8&& $d[y+1][x+1]=='1' then
      solve(y+1,x+1,4)
    elsif x>0&& $d[y][x-1]=='1' then
      solve(y,x-1,3)
    end
  elsif way==2 then
    print 'U'
    if x>0&& $d[y-1][x-1]=='1' then
      solve(y-1,x-1,3)
    elsif y>1&& $d[y-2][x]=='1' then
      solve(y-2,x,2)
    elsif x<4&& $d[y-1][x]=='1' then
      solve(y-1,x,1)
    elsif y<7&& $d[y+2][x]=='1' then
      solve(y+2,x,4)
    end
  elsif way==3 then
    print 'L'
    if y<8&& $d[y+1][x]=='1' then
      solve(y+1,x,4)
    elsif x>0&& $d[y][x-1]=='1' then
      solve(y,x-1,3)
    elsif y>0&& $d[y-1][x]=='1' then
      solve(y-1,x,2)
    elsif x<4&& $d[y][x+1]=='1' then
      solve(y,x+1,1)
    end
  elsif way==4 then
    print 'D'
    if x<4&& $d[y+1][x]=='1' then
      solve(y+1,x,1)
    elsif y<7&& $d[y+2][x]=='1' then
      solve(y+2,x,4)
    elsif x>0&& $d[y+1][x-1]=='1' then
      solve(y+1,x-1,3)
    elsif y>1&& $d[y-2][x]=='1' then
      solve(y-2,x,2)
    end
  end
end
$d = Array.new(9)
9.times do |i|
  $d[i] = gets
end
print 'R'
solve(0,1,1)
puts