def move_right(m, rs, x, y)
	puts "move_right #{x} #{y} #{rs}"
	if m[y][x] == 1 then
		x += 1
		rs << "R"

		if x < m[y].size then
			move_right(m, rs, x, y)
			return
		end
	end

	if y != 0 && m[y-1][x] == 1 then
		move_up(m, rs, x, y-1)
	else
		move_down(m, rs, x, y+1)
	end
end

def move_left(m, rs, x, y)
	puts "move_left  #{x} #{y} #{rs}"
	if x == 0 && y == 0 then
		rs << "L"
		return
	end

	if m[y][x] == 1 then
		x -= 1
		rs << "L"

		if x >= 0 then
			move_left(m, rs, x, y)
			return
		end
	end

	if y != 0 && m[y-1][x+1] == 1 then
		move_up(m, rs, x+1, y-1)
	else
		move_down(m, rs, x+1, y+1)
	end
end

def move_down(m, rs, x, y)
	puts "move_down  #{x} #{y} #{rs}"

	if m[y][x] == 1 then
		y += 2
		rs << "D"

		if y < m.size then
			move_down(m, rs, x, y)
			return
		end
	end

	if x != 0 && m[y-1][x-1] == 1 then
		move_left(m, rs, x-1, y-1)
	else
		move_right(m, rs, x, y-1)
	end
end

def move_up(m, rs, x, y)
	puts "move_up    #{x} #{y} #{rs}"
	if m[y][x] == 1 then
		y -= 2
		rs << "U"

		if y >= 0 then
			move_up(m, rs, x, y)
			return
		end
	end

	if x != 0 && m[y+1][x-1] == 1 then
		move_left(m, rs, x-1, y+1)
	else
		move_right(m, rs, x, y+1)
	end
end

m = []

9.times {
	m.push gets.chomp.split('').map(&:to_i)
}

x = 0
y = 0
rs = ""
move_right(m, rs, x, y)

puts rs