#include <iostream>

using namespace std;

int H, W;
int num;
char c[15][15];
char ans[40];
const int vecj[] = {1, 0, -1, 0}, veci[] = {0, -1, 0, 1};
const char dirc[] = {'R', 'U', 'L', 'D'};

bool dfs(int fi, int fj, int dir, int idx)
{
	int ni, nj, nd;
	if(idx == num) return true;
	
	for(int d = -1; d <= 1; d++){
		ni = fi, nj = fj, nd = (dir+d+4)%4;
		while(1){
			ni += veci[nd], nj += vecj[nd];
			if(ni < 0 || ni >= H || nj < 0 || nj >= W) break;
			if(c[ni][nj] == 'o'){
				c[ni][nj] = '.';
				ans[idx] = dirc[nd];
				if(dfs(ni, nj, nd, idx+1)) return true;;
				c[ni][nj] = 'o';
				break;
			}
		}
	}
	return false;
}

int main(void)
{
	int fi, fj, dir;
	num = 0;
	
	cin >> H >> W;
	for(int i = 0; i < H; i++){
		for(int j = 0; j < W; j++){
			cin >> c[i][j];
			if(c[i][j] != 'o' && c[i][j] != '.') fi = i, fj = j;
			else if(c[i][j] == 'o') num++;
		}
	}
	
	switch(c[fi][fj]){
	case 'U':
		dir = 1;
		break;
	case 'D':
		dir = 3;
		break;
	case 'L':
		dir = 2;
		break;
	case 'R':
		dir = 0;
		break;
	}
	
	dfs(fi, fj, dir, 0);
	for(int i = 0; i < num; i++) cout << ans[i];
	cout << endl;
	
	return 0;
}