#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
char mp[MAXN][MAXN];
int dire[4][2] = {0, -1, -1, 0, 1, 0, 0, 1};
int n, m;
int rev[4];
char ma[10] = "LUDR";
bool Query(int x, int y, char mc) {
  int rx, ry;
  printf("%c\n", mc);
  fflush(stdout);
  scanf("%d%d", &rx, &ry);
  if (rx - 1 == x && ry - 1 == y)
    return false;
  else
    return true;
}
void Move(int x, int y, int di) {
  if (rev[di] == 0) {
    rev[di] = rev[3 - di] = (Query(x, y, ma[di]) ? 1 : -1);
    if (rev[di] == -1) Query(x, y, ma[3 - di]);
  } else
    Query(x, y, ma[rev[di] == 1 ? di : (3 - di)]);
  return;
}
bool DFS(int x, int y) {
  if (mp[x][y] == 'F') return true;
  mp[x][y] = '*';
  for (int di = 0; di < 4; ++di) {
    int xx = x + dire[di][0];
    int yy = y + dire[di][1];
    if (xx < 0 || xx >= n || yy < 0 || yy >= m || mp[xx][yy] == '*') continue;
    Move(x, y, di);
    if (DFS(xx, yy)) return true;
    Move(xx, yy, 3 - di);
  }
  return false;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) scanf("%s", mp[i]);
  DFS(0, 0);
  return 0;
}
