main = interact $ sol . fmap read . words

sol [sx,sy,tx,ty] = u y ++ r x ++ d y ++ l x ++
  l 1 ++ u (y+1)  ++ r (x+1) ++ d 1 ++ r 1 ++ d (y+1) ++ l (x+1) ++ u 1
  where
  x = tx-sx
  y = ty-sy

u n = replicate n 'U'
d n = replicate n 'D'
l n = replicate n 'L'
r n = replicate n 'R'
