#include <bits/stdc++.h>
using namespace std;
int n, m, endx, endy, p[6][2], cnt = 0, c[110 * 110];
bool bj[110][110];
char s[110][110];
char ch[10];
struct node {
  int x, y;
} dad[110][110];
inline int getint() {
  int w = 0, q = 0;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') q = 1, c = getchar();
  while (c >= '0' && c <= '9') w = w * 10 + c - '0', c = getchar();
  return q ? -w : w;
}
void dfs(int x, int y) {
  bj[x][y] = 1;
  if (s[x][y] == 'F') return;
  for (int i = 1; i <= 4; i++) {
    int nx = x + p[i][0];
    int ny = y + p[i][1];
    if (nx <= 0 || nx > n || ny <= 0 || ny > m || bj[nx][ny] ||
        s[nx][ny] == '*')
      continue;
    dfs(nx, ny);
    dad[nx][ny].x = x;
    dad[nx][ny].y = y;
  }
}
void find(int x, int y, int tox, int toy) {
  if (x != 1 || y != 1) find(dad[x][y].x, dad[x][y].y, x, y);
  for (int i = 1; i <= 4; i++)
    if (x + p[i][0] == tox && y + p[i][1] == toy) c[++cnt] = i;
}
int main() {
  p[1][1] = 1, p[2][0] = 1, p[3][1] = -1, p[4][0] = -1;
  ch[1] = 'R';
  ch[2] = 'D';
  ch[3] = 'L';
  ch[4] = 'U';
  cin >> n >> m;
  for (int i = 1; i <= n; i++) scanf("%s", s[i] + 1);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (s[i][j] == 'F') {
        endx = i;
        endy = j;
      }
  dfs(1, 1);
  find(endx, endy, -100, -100);
  int x = 1, y = 1;
  for (int i = 1; i <= cnt; i++) {
    int nx = x + p[c[i]][0], ny = y + p[c[i]][1];
    printf("%c\n", ch[c[i]]);
    int tox, toy;
    cin >> tox >> toy;
    if (tox == x && toy == y) {
      swap(ch[c[i]], ch[(c[i] + 1) % 4 + 1]);
      printf("%c\n", ch[c[i]]);
      int he;
      cin >> he >> he;
    } else {
      if (tox != nx || toy != ny) {
        swap(ch[c[i]], ch[(c[i] + 1) % 4 + 1]);
        printf("%c\n", ch[c[i]]);
        int he;
        cin >> he >> he;
        printf("%c\n", ch[c[i]]);
        cin >> he >> he;
      }
    }
    x = nx, y = ny;
  }
  return 0;
}
