dir = ["U", "R", "D", "L"]
wall = [[0,0,0,0,0]]
9.times do |i|
  if i % 2 == 0
    wall << ("0" + gets.chomp + "0").split(//).map(&:to_i)
  else
    wall << gets.chomp.split(//).map(&:to_i)
  end
end
wall << [0,0,0,0,0]
route = []
position = Array.new(6){|i|Array.new(6)}
t, y = 0, 0
position[t][y] = 1
while t != 0 or y != 0 or route.size == 0
  if position[t][y] % 2 == 0
    if wall[2 * t + position[t][y] - 1][y] == 0
      position[t + position[t][y] - 1][y] = (position[t][y] + 1) % 4
      t += position[t][y] - 1
    else
      position[t][y] = (position[t][y] - 1) % 4
      route << dir[position[t][y]]
    end
  else
    if wall[2 * t][y + (3 - position[t][y]) / 2 - 1] == 0
      position[t][y - position[t][y] + 2] = (position[t][y] + 1) % 4
      y -= position[t][y] - 2
    else
      position[t][y] = (position[t][y] - 1) % 4
      route << dir[position[t][y]]
    end
  end
end
puts route.join