#include<stdio.h>
#include <iostream>
#include <math.h>
#include <numeric>
#include <vector>
#include <map>
#include <functional>
#include <stdio.h>
#include <array>
#include <algorithm>
#include <string>
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <queue>
#include<iomanip>
#include<bitset>
#include<stack>
#include<set>
#include<limits>
#include <complex>
using namespace std;

const int mod = 1000000007;
struct Mod {
public:
	int num;
	Mod() : num(0) { ; }
	Mod(long long int n) : num((n % mod + mod) % mod) { ; }
	Mod(int n) : num((n % mod + mod) % mod) { ; }
	operator int() { return num; }
};

Mod operator+(const Mod a, const Mod b) { return Mod((a.num + b.num) % mod); }
Mod operator+(const long long int a, const Mod b) { return Mod(a) + b; }
Mod operator++(Mod &a) { return a + Mod(1); }
Mod operator-(const Mod a, const Mod b) { return Mod((mod + a.num - b.num) % mod); }
Mod operator-(const long long int a, const Mod b) { return Mod(a) - b; }
Mod operator--(Mod &a) { return a - Mod(1); }
Mod operator*(const Mod a, const Mod b) { return Mod(((long long)a.num * b.num) % mod); }
Mod operator*(const long long int a, const Mod b) { return Mod(a)*b; }
Mod operator+=(Mod &a, const Mod b) { return a = a + b; }
Mod operator+=(long long int &a, const Mod b) { return a = a + b; }
Mod operator-=(Mod &a, const Mod b) { return a = a - b; }
Mod operator-=(long long int &a, const Mod b) { return a = a - b; }
Mod operator*=(Mod &a, const Mod b) { return a = a * b; }
Mod operator*=(long long int &a, const Mod b) { return a = a * b; }
Mod operator^(const Mod a, const int n) {
	if (n == 0) return Mod(1);
	Mod res = (a * a) ^ (n / 2);
	if (n % 2) res = res * a;
	return res;
}
Mod inv(const Mod a) { return a ^ (mod - 2); }
Mod operator/(const Mod a, const Mod b) {
	assert(b.num != 0);
	return a * inv(b);
}
Mod operator/(const long long int a, const Mod b) {
	assert(b.num != 0);
	return Mod(a) * inv(b);
}
Mod operator/=(Mod &a, const Mod b) {
	assert(b.num != 0);
	return a = a * inv(b);
}

#define MAX_N 1024000

Mod fact[MAX_N], factinv[MAX_N];
void init() {
	fact[0] = Mod(1); factinv[0] = 1;
	for (int i = 0; i < MAX_N - 1; ++i) {
		fact[i + 1] = fact[i] * Mod(i + 1);
		factinv[i + 1] = factinv[i] / Mod(i + 1);
	}
}
Mod comb(const int a, const int b) {
	return fact[a] * factinv[b] * factinv[a - b];
}
template<typename T>
vector<vector<T>> keisann(const vector<vector<T>>l, const vector<vector<T>>r) {
	vector<vector<T>>ans(l.size(), vector<T>(r[0].size()));
	assert(l[0].size() == r.size());
	for (unsigned int h = 0; h < l.size(); ++h) {
		for (unsigned int i = 0; i < r.size(); ++i) {
			for (unsigned int w = 0; w < r[0].size(); ++w) {
			
				ans[h][w] +=l[h][i] * r[i][w];
			}
		}
	}
	return ans;
}
template<typename T>
vector<vector<T>>powgyou(vector<vector<T>>a, const long long int n) {
	assert(a.size() == a[0].size());
	if (!n) {
		vector<vector<T>>e(a.size(), vector<T>(a[0].size()));
		for (unsigned int i = 0; i < a.size(); ++i) {
			e[i][i] = 1;
		}
		return e;
	}
	if (n == 1)return a;
	else {
		vector<vector<T>>ans(a.size(), vector<T>(a[0].size(), 0));
		ans = powgyou(a, n / 2);
		ans = keisann(ans, ans);
		if (n % 2) {
			ans = keisann(ans, a);
		}
		return ans;
	}
}



long long int powint(long long int a, int b) {
	if (b == 0)return 1;
	if (b == 1)return a;
	else {
		long long int ans = 1;
		long long int c = powint(a, b / 2);
		ans *= c*c;
		ans *= (b % 2) ? a : 1;
		return ans;
	}
	
}

int dx[4] = { -1,0,1,0 };
int dy[4] = { 0,1,0,-1 };


vector<vector<int>>fd(10, vector<int>(10,0));
vector<int>ans;

int aok(vector<vector<int>>a, const int ax,const int ay,const int away,int count) {
	if (count == 0)return 1;
	for (int i = 0; i < 4; ++i) {
		if ((i + 2) % 4 == away) {
			continue;
		}

		int nx(ax), ny(ay);

		while (1) {
			nx += dx[i]; ny += dy[i];
			if (nx >= 10 || nx < 0 || ny>=10 || ny < 0)break;
			if (a[ny][nx]) {
				a[ny][nx] = 0;
				if (aok(a, nx, ny, i,count-1) != -1) {
					ans.push_back(i);
					return 1;
				}
				else {
					a[ny][nx] = 1;
					break;
				}
				a[ny][nx] = 1;
			}
		}
	}
	return -1;
}

int main(void) {
	int H, W; cin >> H >> W;
	int way;
	int count = 0;
	int ax, ay;
	for (int i = 0; i < H; ++i) {
		string st; cin >> st;
		for (int j = 0; j < W; ++j) {
			if (st[j] == '.') {
				fd[i][j] = 0;
			}
			else if (st[j] == 'o') {
				fd[i][j] = 1;
				count++;
			}
			else {
				ax = j; ay = i;
				fd[i][j] = 0;
				if (st[j] == 'U') {
					way = 3;
				}
				else if (st[j] == 'D') {
					way = 1;
				}
				else if (st[j] == 'L') {
					way = 0;
				}
				else {
					way = 2;
				}
			}
		}
	}
	aok(fd, ax, ay, way, count);
	reverse(ans.begin(), ans.end());
	for (int i = 0; i < ans.size(); ++i) {
		if (ans[i] == 0) {
			cout << 'L';
		}
		else if (ans[i] == 1) {
			cout << 'D';
		}
		else if (ans[i] == 2) {
			cout << 'R';
		}
		else {
			cout << 'U';
		}
	}
	cout << endl;
	return 0;
}

/*
4
0 4
7 12
6 8
4 6

*/

Measured memory_bytes: 11232