#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
const int inf = 0x3f3f3f3f;
int row[4] = {-1, 0, 1, 0};
int col[4] = {0, -1, 0, 1};
char k[4] = {'U', 'L', 'D', 'R'};
int n, m;
char s[maxn][maxn];
int b[maxn][maxn];
int pre[maxn][maxn];
int swaplr = -1, swapud = -1;
int ansx, ansy;
queue<pair<int, int> > q;
vector<int> ans;
bool ok(int x, int y) {
  if (x < 1 || y < 1 || x > n || y > m) return 0;
  if (s[x][y] == '*') return 0;
  return 1;
}
void bfs() {
  memset(b, inf, sizeof(b));
  b[1][1] = 0;
  q.push({1, 1});
  while (!q.empty()) {
    pair<int, int> u = q.front();
    q.pop();
    int x = u.first;
    int y = u.second;
    if (s[x][y] == 'F') {
      ansx = x;
      ansy = y;
      break;
    }
    for (int i = 0; i < 4; i++) {
      int nx = x + row[i];
      int ny = y + col[i];
      if (ok(nx, ny)) {
        if (b[nx][ny] > b[x][y] + 1) {
          b[nx][ny] = b[x][y] + 1;
          pre[nx][ny] = i;
          q.push({nx, ny});
        }
      }
    }
  }
}
void dfs(int x, int y) {
  if (x == 1 && y == 1) return;
  int c = (pre[x][y] + 2) % 4;
  int nx = x + row[c];
  int ny = y + col[c];
  dfs(nx, ny);
  ans.push_back(pre[x][y]);
}
void print() {
  int x = 1, y = 1;
  int nx = 1, ny = 1;
  int now = 0;
  int siz = ans.size();
  while (now < siz) {
    x = nx, y = ny;
    if (ans[now] % 2 == 0) {
      if (swapud <= 0)
        printf("%c\n", k[ans[now]]);
      else
        printf("%c\n", k[(ans[now] + 2) % 4]);
    } else {
      if (swaplr <= 0)
        printf("%c\n", k[ans[now]]);
      else
        printf("%c\n", k[(ans[now] + 2) % 4]);
    }
    fflush(stdout);
    scanf("%d%d", &nx, &ny);
    if (ans[now] % 2 == 0 && swapud != -1) {
      now++;
      continue;
    }
    if (ans[now] % 2 == 1 && swaplr != -1) {
      now++;
      continue;
    }
    if (nx == x + row[ans[now]] && ny == y + col[ans[now]]) {
      if (ans[now] % 2 == 0)
        swapud = 0;
      else
        swaplr = 0;
      now++;
    } else {
      if (ans[now] % 2 == 0)
        swapud = 1;
      else
        swaplr = 1;
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%s", s[i] + 1);
  bfs();
  dfs(ansx, ansy);
  print();
  return 0;
}
