#include <bits/stdc++.h>
long long int mod = 1000000000 + 7;
long long int inf = (long long int)(5e18);
using namespace std;
mt19937 unlucko(chrono::steady_clock::now().time_since_epoch().count());
vector<int> ans;
char a[100][100];
int n, m;
bool dfs(int x, int y) {
  if (x >= n || y >= m || x < 0 || y < 0 || a[x][y] == '*') return false;
  if (a[x][y] == 'F') return true;
  a[x][y] = '*';
  if (dfs(x + 1, y)) {
    ans.push_back(1);
    return true;
  }
  if (dfs(x - 1, y)) {
    ans.push_back(0);
    return true;
  }
  if (dfs(x, y + 1)) {
    ans.push_back(2);
    return true;
  }
  if (dfs(x, y - 1)) {
    ans.push_back(3);
    return true;
  }
  return false;
}
int main() {
  iostream::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  char dirs[4]{'U', 'D', 'R', 'L'};
  cin >> n >> m;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> a[i][j];
  dfs(0, 0);
  reverse(ans.begin(), ans.end());
  bool swx = false, swy = false;
  int x = 1, y = 1, nx, ny;
  for (int i = 0; i < ans.size(); i++) {
    int it = ans[i];
    if (it < 2 && !swx) {
      cout << dirs[it] << endl;
      cin >> nx >> ny;
      swx = true;
      if (nx == x && ny == y) {
        swap(dirs[it], dirs[1 - it]);
        --i;
      } else
        x++;
    } else if (it < 2) {
      cout << dirs[it] << endl;
      cin >> x >> y;
    }
    if (it > 1 && !swy) {
      cout << dirs[it] << endl;
      cin >> nx >> ny;
      swy = true;
      if (nx == x && ny == y) {
        swap(dirs[it], dirs[5 - it]);
        --i;
      } else
        y++;
    } else if (it > 1) {
      cout << dirs[it] << endl;
      cin >> x >> y;
    }
  }
}
