#include<bits/stdc++.h>
using namespace std;

int h,w;
const int dy[] = {-1,0,1,0}, dx[] = {0,1,0,-1};
const string dir = "URDL";
vector<string> g;

string dfs(int y,int x,int d,int rem,string s){
  if(rem==0)return s;
  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'){
	string tmp = dfs(ny,nx,nd,rem-1,s+dir[nd]);
	if(tmp.size())return tmp;
	break;
      }
      ny += dy[nd]; nx += dx[nd];
    }
  }

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

int main(){
  int y,x,d,cnt = 0;
  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++;
    }
  }
  cout << dfs(y,x,d,cnt,"") << endl;
}
  