#include <iostream>
#include <algorithm>

using namespace std;

const int N = 10;
char g[N][N];
char buff[31];

const string dc = "UDRL";
const int di[] = {-1, 1, 0, 0};
const int dj[] = {0, 0, 1, -1};

pair<int, int> tmp[31];
#include <map>
map<pair<char, char>, bool> taboo;

bool rec(int h, int w, int i, int j, int depth, int lim, char last)
{  
  if (depth == lim) return true;
  g[i][j] = '.';

  for (int d = 0; d < 4; ++d) {
    if (taboo[make_pair(dc[d], last)]) {
      continue;
    }
    for (int len = 0; ; ++len) {
      int ni = i + di[d] * len;
      int nj = j + dj[d] * len;
      if (ni < 0 || nj < 0) break;
      if (h <= ni || w <= nj) break;
      if (g[ni][nj] == '.') continue;
      if (rec(h, w, ni, nj, depth + 1, lim, dc[d])) {
        buff[depth] = dc[d];
        tmp[depth] = make_pair(ni, nj);
        return true;
      }
      break;
    }
  }

  g[i][j] = 'o';
  return false;
}

int main(void)
{
  taboo[make_pair('U', 'D')] = true;
  taboo[make_pair('D', 'U')] = true;
  taboo[make_pair('R', 'L')] = true;
  taboo[make_pair('L', 'R')] = true;
  
  int h, w;
  while (cin >> h >> w) {
    int si, sj;
    int lim = 0;
    for (int i = 0; i < h; ++i) {
      for (int j = 0; j < w; ++j) {
        cin >> g[i][j];
        if (g[i][j] == 'o') ++lim;
        if (g[i][j] != 'o' && g[i][j] != '.') {
          si = i;
          sj = j;
        }
      }
    }
    fill(buff, buff + 31, '\0');
    rec(h, w, si, sj, 0, lim, g[si][sj]);
    puts(buff);
    
    continue;
    cout << si << ' ' << sj << endl;
    for (int i = 0; i < lim; ++i) {
      cout << tmp[i].first << ' ' << tmp[i].second << endl;
    }
  }
  return 0;
}