#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
const int    INF = 100000000;
const double EPS = 1e-10;
const int    MOD = 1000000007;
using namespace std;
typedef pair<int,int> P;

int dh[4] = {0,1,0,-1};
int dw[4] = {1,0,-1,0};
char out[4] ={'R','D','L','U'};
int H, W;
char brd[10][10];
int x[10][10];
int cnt;
vector<int> ans;

int dfs(int hh, int ww, int dir, int counter){
	if(counter == cnt){
		return 0;
	}
	int ret = INF;
	bool end = false;
	rep(i,4){
		if(i == (dir+2)%4) continue;
		int h = hh, w = ww;
		while(true){
			h += dh[i]; w += dw[i];
			if(h >= H || h < 0 || w >= W || w < 0) break;
			if(brd[h][w] == 'o'){
				brd[h][w] = '.';
				ret = min(dfs(h,w,i,counter+1),ret);
				brd[h][w] = 'o';
				if(ret < INF){
					ans.push_back(i);
					end = true;
				}
				break;
			}
		}
		if(end) break;
	}
	return ret;
}

int main(){
	int sh, sw, sdir;
	cin >> H >> W;
	rep(i,H) rep(j,W){
		cin >> brd[i][j];
		if(brd[i][j] == 'o') cnt++;
		if(brd[i][j] == 'U'){ sh = i; sw = j; sdir = 3;}
		if(brd[i][j] == 'D'){ sh = i; sw = j; sdir = 1;}
		if(brd[i][j] == 'R'){ sh = i; sw = j; sdir = 0;}
		if(brd[i][j] == 'L'){ sh = i; sw = j; sdir = 2;}
	}
	rep(i,H) rep(j,W){
		if(brd[i][j] == 'o'){
			rep(k,H){
				if(k == i) continue;
				if(brd[k][j] == 'o'){
					x[i][j]++;
				}
			}
			rep(k,W){
				if(k == j) continue;
				if(brd[i][k] == 'o'){
					x[i][j]++;
				}
			}
		}
	}
	int tmp = dfs(sh,sw,sdir,0);
	for(int i = ans.size()-1; i >= 0; i--){
		cout << out[ans[i]];
	}
	cout << endl;
}