map = [[0]*7] + readlines.map{|l| [0] + l.chomp.chars.map(&:to_i) + [0] } + [[0]*7]
x,y = 1,1
left = -1
pos = 1
C = %w(U R D L)
D = [[-1,0], [0,1], [1,0], [0,-1]]
E = [-1, 0, 0, 0]
d = 0
loop do
  if map[x+D[d].first][y+D[d].last*(d==1 ? 0 : 1)]==1
    print C[d]
    dx,dy = *D[d]
    d = (d-1) % 4
    pos = 1
  elsif map[x+D[(d+1)%4].first][y+D[(d+1)%4].last + E[d]]==1
    print C[(d+1)%4]
    dx,dy = *D[(d+1)%4]
  else
    print C[(d+2)%4]
    dx,dy = *D[(d+2)%4]
    d = (d+1) % 4
  end
  x,y = x+dx*2,y+dy
  break if [x,y]==[1,1]
end
puts