c=[[[?0*6]]*2]
5.times{|i|c<<[?0+gets[0,4]+?0,i<4?(?0+gets):?0*6]}
x=2
y=d=1
r=?R
[(t,u,d=[[0,0,1,-1,0,3],[1,1,0,0,-1,0],[0,0,0,1,0,1],[1,0,0,0,1,2]].rotate(d).find{|i,j,k|c[y-j][i][x-k]==?1}[3,3]),x+=t,y+=u,r+="URDL"[d]]while x+y>2
puts r