#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int mod = 1e9 + 7;
const int N3 = 1e3 + 10;
const int INF = 2e9 + 10;
const long long LINF = 2e18;
bool u[200][200];
pair<int, int> ch[4];
int sz1, sz2, sz3, tp1, tp2, tp3;
int X[4] = {-1, 0, 1, 0};
int Y[4] = {0, 1, 0, -1};
char chr[4] = {'U', 'R', 'D', 'L'}, c[200][200];
int n, m, ans[N], anslen;
pair<int, int> q[N];
int d[N], pr[N];
void push1(pair<int, int> a) {
  q[sz1] = a;
  sz1++;
}
void push2(int a) {
  pr[sz2] = a;
  sz2++;
}
void push3(int a) {
  d[sz3] = a;
  sz3++;
}
pair<int, int> top1() { return q[tp1]; }
int top2() { return pr[tp2]; }
int top3() { return d[tp3]; }
void pop1() { tp1++; }
void pop2() { tp2++; }
void pop3() { tp3++; }
int size1() { return sz1 - tp1; }
bool in(int x, int y) { return ((0 < x && x <= n) && (0 < y && y <= m)); }
void fnd() {
  push1(make_pair(1, 1));
  push2(-1);
  push3(1);
  u[1][1] = 1;
  while (size1()) {
    auto temp = top1();
    int x = temp.first;
    int y = temp.second;
    u[x][y] = 1;
    for (int dir = 0; dir <= 3; ++dir) {
      int nx = x + X[dir];
      int ny = y + Y[dir];
      if (in(nx, ny) && !u[nx][ny] && c[nx][ny] != '*') {
        push1(make_pair(nx, ny));
        push2(tp1);
        push3(top3() + 1);
        u[nx][ny] = 1;
        if (c[nx][ny] == 'F') {
          return;
        }
      }
    }
    pop1();
    pop2();
    pop3();
  }
}
void restore() {
  int x, y, nx, ny;
  for (int i = sz1 - 1, mov = d[sz3 - 1]; i >= 0; mov--, i = pr[i]) {
    if (i == sz1 - 1) {
      x = q[i].first;
      y = q[i].second;
      continue;
    }
    anslen = max(anslen, mov);
    nx = q[i].first;
    ny = q[i].second;
    pair<int, int> diff = make_pair(x - nx, y - ny);
    bool ok = 0;
    for (int dir = 0; dir <= 3; ++dir) {
      if (!ok && diff == ch[dir]) {
        ans[mov] = dir;
        ok = 1;
      }
    }
    x = nx;
    y = ny;
  }
}
int main() {
  if ("" != "") {
    freopen(
        ""
        ".in",
        "r", stdin);
    freopen(
        ""
        ".out",
        "w", stdout);
  }
  cin >> n >> m;
  for (int i = 0; i <= 3; ++i) {
    ch[i] = make_pair(X[i], Y[i]);
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      cin >> c[i][j];
    }
  }
  fnd();
  restore();
  pair<int, int> coor = make_pair(1, 1);
  for (int i = 1; i <= anslen; ++i) {
    cout << chr[ans[i]] << '\n';
    int a, b;
    cin >> a >> b;
    pair<int, int> temp = make_pair(a, b);
    if (temp == coor) {
      swap(chr[ans[i]], chr[(ans[i] + 2) % 4]);
      cout << chr[ans[i]] << '\n';
      cin >> a >> b;
      coor = make_pair(a, b);
    } else {
      coor = temp;
    }
  }
  return 0;
}
