#include <bits/stdc++.h>
using namespace std;
int main() {
  bool a = 0, b = 0;
  int n, m, x, y, i = 0, j = 0, posj, posi;
  cin >> n >> m;
  char R = 'R', L = 'L', U = 'U', D = 'D';
  char types[m][n];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> types[j][i];
      if (types[j][i] == 'F') {
        posj = j;
        posi = i;
      }
    }
    cout << "\n";
  }
  while (1 == 1) {
    if (j < posj && i < posi) {
      if (j + 1 != m && (types[j + 1][i] == 'F' || types[j + 1][i] == '.')) {
        cout << R << "\n";
        cin >> x >> y;
        if (y == 1 && b == 0) {
          R = 'L';
          L = 'R';
        } else {
          if (types[j + 1][i] == 'F') {
            return 0;
          }
          b = 1;
          types[j][i] = '#';
          j++;
        }
      } else if (i + 1 != n &&
                 (types[j][i + 1] == 'F' || types[j][i + 1] == '.')) {
        cout << D << "\n";
        cin >> x >> y;
        if (x == 1 && a == 0) {
          U = 'D';
          D = 'U';
        } else {
          if (types[j][i + 1] == 'F') {
            return 0;
          }
          a = 1;
          types[j][i] = '#';
          i++;
        }
      } else if (j != 0 && (types[j - 1][i] == '.' || types[j - 1][i] == 'F')) {
        cout << L << "\n";
        types[j][i] = '@';
        cin >> x >> y;
        if (types[j - 1][i] == 'F') {
          return 0;
        }
        j--;
      } else if (i != 0 && (types[j][i - 1] == '.' || types[j][i - 1] == 'F')) {
        cout << U << "\n";
        types[j][i] = '@';
        cin >> x >> y;
        if (types[j][i - 1] == 'F') {
          return 0;
        }
        i--;
      } else if (i != n - 1 && (types[j][i + 1] == '#')) {
        cout << D << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i++;
      } else if (i != 0 && (types[j][i - 1] == '#')) {
        cout << U << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i--;
      } else if (j != m - 1 && (types[j + 1][i] == '#')) {
        cout << R << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j++;
      } else if (j != 0 && (types[j - 1][i] == '#')) {
        cout << L << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j--;
      } else if (i != n - 1 && (types[j][i + 1] == '@')) {
        cout << D << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i++;
      } else if (i != 0 && (types[j][i - 1] == '@')) {
        cout << U << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i--;
      } else if (j != m - 1 && (types[j + 1][i] == '@')) {
        cout << R << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j++;
      } else if (j != 0 && (types[j - 1][i] == '@')) {
        cout << L << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j--;
      }
    } else if (j >= posj && i >= posi) {
      if (j != 0 && (types[j - 1][i] == '.' || types[j - 1][i] == 'F')) {
        cout << L << "\n";
        types[j][i] = '@';
        cin >> x >> y;
        if (types[j - 1][i] == 'F') {
          return 0;
        }
        j--;
      } else if (i != 0 && (types[j][i - 1] == '.' || types[j][i - 1] == 'F')) {
        cout << U << "\n";
        types[j][i] = '@';
        cin >> x >> y;
        if (types[j][i - 1] == 'F') {
          return 0;
        }
        i--;
      } else if (j + 1 != m &&
                 (types[j + 1][i] == 'F' || types[j + 1][i] == '.')) {
        cout << R << "\n";
        cin >> x >> y;
        if (y == 1 && b == 0) {
          R = 'L';
          L = 'R';
        } else {
          if (types[j + 1][i] == 'F') {
            return 0;
          }
          b = 1;
          types[j][i] = '#';
          j++;
        }
      } else if (i + 1 != n &&
                 (types[j][i + 1] == 'F' || types[j][i + 1] == '.')) {
        cout << D << "\n";
        cin >> x >> y;
        if (x == 1 && a == 0) {
          U = 'D';
          D = 'U';
        } else {
          if (types[j][i + 1] == 'F') {
            return 0;
          }
          a = 1;
          types[j][i] = '#';
          i++;
        }
      } else if (i != 0 && (types[j][i - 1] == '#')) {
        cout << U << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i--;
      } else if (j != 0 && (types[j - 1][i] == '#')) {
        cout << L << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j--;
      } else if (i != n - 1 && (types[j][i + 1] == '#')) {
        cout << D << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i++;
      } else if (j != m - 1 && (types[j + 1][i] == '#')) {
        cout << R << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j++;
      } else if (j != 0 && (types[j - 1][i] == '@')) {
        cout << L << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j--;
      } else if (i != 0 && (types[j][i - 1] == '@')) {
        cout << U << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i--;
      } else if (i != n - 1 && (types[j][i + 1] == '@')) {
        cout << D << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i++;
      } else if (j != m - 1 && (types[j + 1][i] == '@')) {
        cout << R << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j++;
      }
    } else if (j < posj) {
      if (j + 1 != m && (types[j + 1][i] == 'F' || types[j + 1][i] == '.')) {
        cout << R << "\n";
        cin >> x >> y;
        if (y == 1 && b == 0) {
          R = 'L';
          L = 'R';
        } else {
          if (types[j + 1][i] == 'F') {
            return 0;
          }
          b = 1;
          types[j][i] = '#';
          j++;
        }
      } else if (i != 0 && (types[j][i - 1] == '.' || types[j][i - 1] == 'F')) {
        cout << U << "\n";
        types[j][i] = '@';
        cin >> x >> y;
        if (types[j][i - 1] == 'F') {
          return 0;
        }
        i--;
      } else if (i + 1 != n &&
                 (types[j][i + 1] == 'F' || types[j][i + 1] == '.')) {
        cout << D << "\n";
        cin >> x >> y;
        if (x == 1 && a == 0) {
          U = 'D';
          D = 'U';
        } else {
          if (types[j][i + 1] == 'F') {
            return 0;
          }
          a = 1;
          types[j][i] = '#';
          i++;
        }
      } else if (j != 0 && (types[j - 1][i] == '.' || types[j - 1][i] == 'F')) {
        cout << L << "\n";
        types[j][i] = '@';
        cin >> x >> y;
        if (types[j - 1][i] == 'F') {
          return 0;
        }
        j--;
      } else if (i != 0 && (types[j][i - 1] == '#')) {
        cout << U << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i--;
      } else if (j != m - 1 && (types[j + 1][i] == '#')) {
        cout << R << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j++;
      } else if (j != 0 && (types[j - 1][i] == '#')) {
        cout << L << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j--;
      } else if (i != n - 1 && (types[j][i + 1] == '#')) {
        cout << D << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i++;
      } else if (i != 0 && (types[j][i - 1] == '@')) {
        cout << U << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i--;
      } else if (j != m - 1 && (types[j + 1][i] == '@')) {
        cout << R << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j++;
      } else if (i != n - 1 && (types[j][i + 1] == '@')) {
        cout << D << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i++;
      } else if (j != 0 && (types[j - 1][i] == '@')) {
        cout << L << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j--;
      }
    } else if (i < posi) {
      if (i + 1 != n && (types[j][i + 1] == 'F' || types[j][i + 1] == '.')) {
        cout << D << "\n";
        cin >> x >> y;
        if (x == 1 && a == 0) {
          U = 'D';
          D = 'U';
        } else {
          if (types[j][i + 1] == 'F') {
            return 0;
          }
          a = 1;
          types[j][i] = '#';
          i++;
        }
      } else if (j != 0 && (types[j - 1][i] == '.' || types[j - 1][i] == 'F')) {
        cout << L << "\n";
        types[j][i] = '@';
        cin >> x >> y;
        if (types[j - 1][i] == 'F') {
          return 0;
        }
        j--;
      } else if (j + 1 != m &&
                 (types[j + 1][i] == 'F' || types[j + 1][i] == '.')) {
        cout << R << "\n";
        cin >> x >> y;
        if (y == 1 && b == 0) {
          R = 'L';
          L = 'R';
        } else {
          if (types[j + 1][i] == 'F') {
            return 0;
          }
          b = 1;
          types[j][i] = '#';
          j++;
        }
      } else if (i != 0 && (types[j][i - 1] == '.' || types[j][i - 1] == 'F')) {
        cout << U << "\n";
        types[j][i] = '@';
        cin >> x >> y;
        if (types[j][i - 1] == 'F') {
          return 0;
        }
        i--;
      } else if (i != n - 1 && (types[j][i + 1] == '#')) {
        cout << D << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i++;
      } else if (j != 0 && (types[j - 1][i] == '#')) {
        cout << L << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j--;
      } else if (i != 0 && (types[j][i - 1] == '#')) {
        cout << U << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i--;
      } else if (j != m - 1 && (types[j + 1][i] == '#')) {
        cout << R << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j++;
      } else if (i != n - 1 && (types[j][i + 1] == '@')) {
        cout << D << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i++;
      } else if (j != 0 && (types[j - 1][i] == '@')) {
        cout << L << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j--;
      } else if (i != 0 && (types[j][i - 1] == '@')) {
        cout << U << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        i--;
      } else if (j != m - 1 && (types[j + 1][i] == '@')) {
        cout << R << "\n";
        types[j][i] = '*';
        cin >> x >> y;
        j++;
      }
    }
  }
}
