#include <iostream>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <vector>
using namespace std;

typedef pair<int,int> P;

struct S {
  int x, y, d;
  S() {}
  S(int x, int y, int d) : x(x), y(y), d(d) {}
};

const int MAX_H = 11;
const int MAX_W = MAX_H;
const int dx[] = {1,0,-1,0};
const int dy[] = {0,1,0,-1};
map<char,int> conv1;
map<int,char> conv2;
int path[300];

int H, W;
char G[MAX_H][MAX_W];

void make() {
  conv1['R'] = 0;
  conv1['D'] = 1;
  conv1['L'] = 2;
  conv1['U'] = 3;
  conv2[0] = 'R';
  conv2[1] = 'D';
  conv2[2] = 'L';
  conv2[3] = 'U';
}

int canJump(int x, int y, int d) {
  for(int l = 1; ; ++l) {
    int nx = x + l*dx[d];
    int ny = y + l*dy[d];
    if(nx < 0 || nx >= W) return -1;
    if(ny < 0 || ny >= H) return -1;
    if(G[ny][nx] == '.') continue;
    if(G[ny][nx] == 'o') return l;
  }
  return -1;
}

bool rec(int x, int y, int d, int max_step, int step) {
  if(step == max_step) {
/*
    for(int i = 0; i < H; ++i) {
      for(int j = 0; j < W; ++j) cout << G[i][j];
      cout << endl;
    }
*/
    return true;
  }
  for(int k = -1; k <= 1; ++k) {
    int nd = (d+k+4)%4;
    int l = canJump(x,y,nd);
    if(l == -1) continue;
    int nx = x + l*dx[nd];
    int ny = y + l*dy[nd];
    G[y][x] = '.';
    path[step] = nd;
    if(rec(nx,ny,nd,max_step, step+1)) return true;
    G[y][x] = 'o';
  }
  return false;
}

int count() {
  int cnt = 0;
  for(int i = 0; i < H; ++i) {
    for(int j = 0; j < W; ++j) {
      if(G[i][j] == 'o') ++cnt;
    }
  }
  return cnt;
}

void solve(int sx, int sy, int sd) {
  int step = count() - 1;
  rec(sx,sy,sd,step,0);
  for(int i = 0; i < step; ++i)
    cout << conv2[path[i]];
  cout << endl;
}


int main() {
  make();
  while(cin >> H >> W && (H | W)) {
    int sx, sy, sd;
    for(int i = 0; i < H; ++i) {
      for(int j = 0; j < W; ++j) {
        cin >> G[i][j];
        if(G[i][j] != '.' && G[i][j] != 'o') {
          sx = j;
          sy = i;
          sd = conv1[G[i][j]];
          G[i][j] = 'o';
        }
      }
    }
    solve(sx,sy,sd);
  }
  return 0;
}