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

int H, W, N;
constexpr char D[4] = {'U', 'R', 'D', 'L'};
constexpr int dx[4] = {0, 1, 0, -1},
              dy[4] = {-1, 0, 1, 0};

string dfs(int y, int x, int d, string res, vector<string>& v) {
    if(res.size() == N) {
        return res;
    }

    v[y][x] = '.';
    for(int i=0; i<4; ++i) {
        if(i == (d + 2) % 4) {
            continue;
        }

        int ny = y, nx = x;
        while(0 <= ny && ny < H && 0 <= nx && nx < W) {
            if(v[ny][nx] == 'o') {
                break;
            }
            ny += dy[i];
            nx += dx[i];
        }
        if(0 <= ny && ny < H && 0 <= nx && nx < W) {
            string r = dfs(ny, nx, i, res + D[i], v);
            if(r != "") {
                return r;
            }
        }
    }
    v[y][x] = 'o';

    return "";
}

int main() {
    cin >> H >> W;
    vector<string> v(H);
    int sx, sy, sd;
    for(int i=0; i<H; ++i) {
        cin >> v[i];
        for(int j=0; j<W; ++j) {
            N += v[i][j] == 'o';
            if(v[i][j] == 'U' || v[i][j] == 'D' || v[i][j] == 'L' || v[i][j] == 'R') {
                sy = i;
                sx = j;
                sd = find(D, D+4, v[i][j]) - D;
            }
        }
    }
    cout << dfs(sy, sx, sd, "", v) << endl;
}
