$drc = [[0, 1], [0, -1], [1, 0], [-1, 0]]
def dfs(y, x, d, n)
  return true if n == $max
  $fld[y][x] = false
  4.times do |i|
    next if i == 'UDLR'.index(d)
    ny, nx = y, x
    loop do
      nx += $drc[i][0]; ny += $drc[i][1]
      break if $fld[ny][nx].nil?
      if $fld[ny][nx]
        $ans[n] = 'DURL'[i]
        return true if dfs(ny, nx, 'DURL'[i], n + 1)
        break
      end
    end
  end
  $fld[y][x] = true
  false
end


sx = sy = 0; d = ''
r, c = gets.split.map(&:to_i)
$fld = []
r.times do |y|
  l = gets.chomp.split('')
  l.each do |a|
    if a != '.' && a != 'o'
      sx = l.index(a) + 1
      sy = y + 1
      d = a
    end
  end
  $fld << [nil, *l.map{ |a| a == '.' ? false : true }, nil]
end
$fld = [[nil] * (c + 2), *$fld, [nil] * (c + 2)]
$max = $fld.flatten.count(true) - 1
$ans = ['x'] * $max
dfs(sy, sx, d, 0)
puts $ans.join