#include<bits/stdc++.h>
using namespace std;
int h,w,cnt,dy[] = {-1,0,1,0}, dx[] = {0,1,0,-1};
string ans,dir = "URDL";
vector<string> g;

bool dfs(int y,int x,int d,int rem){
  if(rem==cnt)return true;
  char tmp = g[y][x];
  g[y][x] = '.';

  for(int i=3;i<=5;i++){
    int nd = (d+i)%4, ny = y + dy[nd], nx = x + dx[nd];
    while(ny>=0 && nx>=0 && ny<h && nx<w){
      if(g[ny][nx] == 'o'){
	ans[rem] = dir[nd];
	if(dfs(ny,nx,nd,rem+1))return true;
	break;
      }
      ny += dy[nd]; nx += dx[nd];
    }
  }

  g[y][x] = tmp;
  return false;
}

int main(){
  int y,x,d;
  cin >> h >> w;
  g.resize(h);
  for(int i=0;i<h;i++){
    cin >> g[i];
    for(int j=0;j<w;j++){
      if(isupper(g[i][j])){
	y = i; x = j;
	for(int k=0;k<4;k++){
	  if(dir[k] == g[i][j])d = k;
	}
      }else if(g[i][j] == 'o')cnt++;
    }
  }
  ans.resize(cnt);
  dfs(y,x,d,0);
  cout << ans << endl;
}