#include <bits/stdc++.h>
using namespace std;
const int N = 128;
int n, m;
char mp[N][N];
bool vis[N][N];
string path;
bool dfs(int i, int j) {
  static int ds[4][2] = {
      {-1, 0},
      {1, 0},
      {0, -1},
      {0, 1},
  };
  static char ss[] = "UDLR";
  if (mp[i][j] == 'F') return true;
  vis[i][j] = true;
  for (int o = 0; o < 4; ++o) {
    int x = i + ds[o][0], y = j + ds[o][1];
    if (x <= 0 || x > n || y <= 0 || y > m) continue;
    if (vis[x][y] || mp[x][y] == '*') continue;
    if (dfs(x, y)) {
      path += ss[o];
      return true;
    }
  }
  return false;
}
bool swap_lr, swap_ud;
char gao(char c) {
  if (c == 'L' || c == 'R') {
    return swap_lr ? char('L' ^ 'R' ^ c) : c;
  }
  return swap_ud ? char('U' ^ 'D' ^ c) : c;
}
int main() {
  ios_base::sync_with_stdio(false);
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) {
    scanf("%s", &mp[i][1]);
  }
  dfs(1, 1);
  reverse(path.begin(), path.end());
  cout << path[0] << endl;
  int x, y;
  scanf("%d%d", &x, &y);
  size_t i = 1;
  if (x == 1 && y == 1) {
    i = 0;
    (path[0] == 'R' ? swap_lr : swap_ud) = true;
  }
  for (; i < path.size() && path[i] == path[0]; ++i) {
    cout << (path[0] == 'R' ? (swap_lr ? 'L' : 'R') : (swap_ud ? 'U' : 'D'))
         << endl;
    scanf("%d%d", &x, &y);
  }
  if (i < path.size()) {
    cout << path[i] << endl;
    scanf("%d%d", &x, &y);
    if (x == 1 || y == 1) {
      (path[i] == 'R' ? swap_lr : swap_ud) = true;
    } else {
      ++i;
    }
  }
  for (; i < path.size(); ++i) {
    cout << gao(path[i]) << endl;
    scanf("%d%d", &x, &y);
  }
  return 0;
}
