#include <bits/stdc++.h>
using namespace std;
int n, m;
string f;
string b[100];
vector<vector<int> > vis(100, vector<int>(100, 0));
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, -1, 1};
char mov[4] = {'D', 'U', 'L', 'R'};
void preprocess(void) { return; }
void dfs2D(int x, int y, string cur) {
  vis[x][y] = 1;
  if (b[x][y] == 'F') {
    f = cur;
    return;
  }
  for (int i = 0; i < 4; i++) {
    int ny = y + dy[i];
    int nx = x + dx[i];
    if (ny >= m || ny < 0) {
      continue;
    }
    if (nx >= n || nx < 0) {
      continue;
    }
    if (b[nx][ny] == '*') {
      continue;
    }
    if (vis[nx][ny]) {
      continue;
    }
    dfs2D(nx, ny, cur + mov[i]);
  }
}
int main(void) {
  preprocess();
  int t;
  t = 1;
  for (int z = 1; z <= t; z++) {
    ios_base::sync_with_stdio(false);
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
      cin >> b[i];
    }
    dfs2D(0, 0, "");
    int x = 1, y = 1;
    int swaplr = 0;
    int swapud = 0;
    for (char c : f) {
      for (int _ = 0; _ < 2; _++) {
        int ny = y;
        int nx = x;
        if (c == 'L') ny--;
        if (c == 'R') ny++;
        if (c == 'U') nx--;
        if (c == 'D') nx++;
        if (swaplr && (c == 'L' || c == 'R')) {
          c = (c == 'L') ? 'R' : 'L';
        }
        if (swapud && (c == 'U' || c == 'D')) {
          c = (c == 'U') ? 'D' : 'U';
        }
        cout << c << endl;
        int ty, tx;
        cin >> tx >> ty;
        if (tx == -1) {
          return 0;
        }
        if (tx == nx && ty == ny) {
          x = nx;
          y = ny;
          break;
        }
        if (c == 'L' || c == 'R') {
          swaplr = 1;
        } else {
          swapud = 1;
        }
      }
    }
  }
  return 0;
}
