#include <iostream>
#include <string>
#include <string.h>
#include <fstream>
 
using namespace std;
 
#define MAXN 11
 
int n, m, s, e, d, total;
int c[MAXN][MAXN];
int dir[4][2] = {0, -1, -1, 0, 0, 1, 1, 0};
int ans[MAXN * MAXN];
bool ok;
 
int change(char ch)
{
    switch(ch)
    {
        case 'L': return 0;
        case 'U': return 1;
        case 'R': return 2;
        case 'D': return 3;
    }
}
 
char changetwo(int x)
{
    switch(x)
    {
        case 0: return 'L';
        case 1: return 'U';
        case 2: return 'R';
        case 3: return 'D';
    }
}
 
void dfs(int x, int y, int len, int di)
{
    if (len == total)
    {
        ok = true;
        return ;
    }
 
    if (ok)
    {
        return ;
    }
 
    for (int i = 3; i < 6; i++)
    {
        for (int k = 1; k <= 10; k++)
        {
            int xt = x + dir[(i + di) % 4][0] * k, yt = y + dir[(i + di) % 4][1] * k;
 
            if (xt >= 0 && xt < n && yt >= 0 && yt < m && !ok) //注意
            {
                if (c[xt][yt] == 1)
                {
                    ans[len] = (i + di) % 4;
                    len++;
                    c[xt][yt] = 0;
                    dfs(xt, yt, len, (i + di) % 4);
 
                    len--;
                    c[xt][yt] = 1;
                    break;
                }
            }
        }
    }
}
 
void solve()
{
    dfs(s, e, 0, d);
 
    for (int i = 0; i < total; i++)
    {
        cout << changetwo(ans[i]);
    }
    cout << endl;
}
 
void input()
{
    char ch;
 
    while (cin >> n >> m)
    {
        total = 0;
        ok = false;
        for (int i = 0; i < n; i++)
        {
            for (int j = 0; j < m; j++)
            {
                cin >> ch;
                if (ch == '.')
                {
                    c[i][j] = 0;
                }
                else if (ch == 'o')
                {
                    total++;
                    c[i][j] = 1;
                }
                else
                {
                    d = change(ch);
                    s = i, e = j;
                    c[i][j] = 0;
                }
            }
        }
 
        solve();
    }
}
 
int main()
{
    std::ios::sync_with_stdio(false);
    input();
    return 0;
}

