#include <iostream>
#include <cstring>
using namespace std;

int h, w;
int pass[32];
char t[12][12];
string str = "URDL";

int dx[] = {0, 1, 0, -1};
int dy[] = {-1, 0, 1, 0};

bool solve(int idx, int x, int y, int d, int rem){
  if(rem == 0){
    return true;
  }

  t[y][x] = '.';

  for(int i = -1; i <= 1; i++){
    int nd = (d + i + 4) % 4;
    int nx = x;
    int ny = y;

    while(true){
      nx += dx[nd];
      ny += dy[nd];
      if(0 > nx || nx >= w || 0 > ny || ny >= h) break;
      if(t[ny][nx] == 'o'){
        pass[idx] = nd;
        if(solve(idx + 1, nx, ny, nd, rem - 1)) return true;
        break;
      }
    }
  }

  t[y][x] = 'o';

  return false;
}

int main(){
  while(cin >> h >> w){
    int sum = 0;
    int sx, sy, sd;

    for(int i = 0; i < h; i++){
      cin >> t[i];

      for(int j = 0; j < w; j++){
        if(t[i][j] == 'o'){
          sum++;
        }
        else if(t[i][j] != '.'){
          sx = j;
          sy = i;

          if(t[i][j] == 'U') sd = 0;
          else if(t[i][j] == 'R') sd = 1;
          else if(t[i][j] == 'D') sd = 2;
          else if(t[i][j] == 'L') sd = 3;

          t[i][j] = '.';
        }
      }
    }

    solve(0, sx, sy, sd, sum);

    for(int i = 0; i < sum; i++){
      cout << str[pass[i]];
    }
    cout << endl;
  }
}