#include <bits/stdc++.h>
using namespace std;
namespace {};
int x = 1, y = 1;
int x2, y2, delta;
bool swapLR = false, swapUD = false;
char grid[200][200];
void play(char move) {
  if (swapLR) {
    if (move == 'L')
      move = 'R';
    else if (move == 'R')
      move = 'L';
  }
  if (swapUD) {
    if (move == 'U')
      move = 'D';
    else if (move == 'D')
      move = 'U';
  }
  cout << move << '\n';
  cout.flush();
  cin >> x2 >> y2;
  if (grid[x2][y2] == 'F') exit(0);
  delta = abs(x2 - x) + abs(y2 - y);
  x = x2, y = y2;
}
void update() { x = x2, y = y2; }
bool vis[102][102];
int nx[102][102], ny[102][102];
char mv[102][102];
int n, m;
bool dfs(int x, int y) {
  if (grid[x][y] == 'F') return true;
  if (grid[x][y] == '*') return false;
  if (vis[x][y]) return false;
  vis[x][y] = true;
  if (dfs(x + 1, y)) {
    nx[x][y] = x + 1;
    ny[x][y] = y;
    mv[x][y] = 'D';
  } else if (dfs(x - 1, y)) {
    nx[x][y] = x - 1;
    ny[x][y] = y;
    mv[x][y] = 'U';
  } else if (dfs(x, y + 1)) {
    nx[x][y] = x;
    ny[x][y] = y + 1;
    mv[x][y] = 'R';
  } else if (dfs(x, y - 1)) {
    nx[x][y] = x;
    ny[x][y] = y - 1;
    mv[x][y] = 'L';
  } else {
    return false;
  }
  return true;
}
int main() {
  cin >> n >> m;
  fill(grid[0], grid[0] + m + 2, '*');
  fill(grid[n + 1], grid[n + 1] + m + 2, '*');
  for (int i = 1; i <= n; i++) {
    grid[i][0] = '*';
    cin >> (grid[i] + 1);
    grid[i][m + 1] = '*';
  }
  if (grid[1][2] == 'F') {
    play('R');
    play('L');
  }
  if (grid[2][1] == 'F') {
    play('U');
    play('D');
  }
  if (grid[1][2] == '.') {
    play('L');
    if (delta) {
      swapLR = true;
      play('L');
    }
    update();
    for (int j = 1; j <= m; j++) {
      if (grid[2][j] != '*') {
        play('U');
        if (delta) {
          swapUD = true;
          play('U');
        }
        update();
        break;
      }
      play('R');
    }
  } else if (grid[2][1] == '.') {
    play('U');
    if (delta) {
      swapUD = true;
      play('U');
    }
    update();
    for (int i = 1; i <= n; i++) {
      if (grid[i][2] != '*') {
        play('L');
        if (delta) {
          swapLR = true;
          play('L');
        }
        update();
        break;
      }
      play('D');
    }
  }
  dfs(x, y);
  for (int i = x, j = y; grid[i][j] != 'F';) {
    play(mv[i][j]);
    x2 = nx[i][j], y2 = ny[i][j];
    i = x2, j = y2;
  }
  return 0;
}
