#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧  
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     
　　　　／　　　＼　 　 |　|     
　　　 /　　 /￣￣￣￣/　　|  
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿  
　 　　　＼/＿＿＿＿/　（u　⊃  
---------------------------------------------------------------------------------------------------*/




string dir[4] = { "L","D", "R", "U" };
int dx[4] = { -1, 0, 1, 0 }, dy[4] = { 0, 1, 0, -1 } ;
int H, W;
string B[505];
vector<int> history;
//---------------------------------------------------------------------------------------------------
int check(int x, int y, int d) {
    int xx = x + dx[d];
    int yy = y + dy[d];

    if (xx < 0 or W <= xx or yy < 0 or H <= yy) return 0;
    if (B[yy][xx] == '.') return 0;
    return 1;
}
//---------------------------------------------------------------------------------------------------
int cux = 3, cuy = 1;
int dbg = 0;
int ask(int com) {
    printf("? %s\n", dir[com].c_str());
    fflush(stdout);

    if (dbg) {
        int xx = cux + dx[com];
        int yy = cuy + dy[com];

        if (xx < 0 or W <= xx or yy < 0 or H <= yy) return 0;
        if (B[yy][xx] == '.') return 0;
        cux = xx;
        cuy = yy;
        return 1;
    }

    string res; cin >> res;

    if (res == "NO") return 0;
    return 1;
}
//---------------------------------------------------------------------------------------------------
int vis[2010][2010][4];
vector<pair<int, int>> mov;
int lastx, lasty;
void record() {
    while(ask(0)) history.push_back(0);

    vector<pair<int, int>> tmp;

    int x = 1010, y = 1010, d = 1;
    int mix = 1010, miy = 1010;
    while (vis[y][x][d] == 0) {
        vis[y][x][d] = 1;
        tmp.push_back({ x, y });
        chmin(mix, x);
        chmin(miy, y);

        rep(dd, 0, 4) {
            int d2 = (d + 3 + dd) % 4;

            int res = ask(d2);
            if (res) {
                history.push_back(d2);
                x += dx[d2];
                y += dy[d2];
                d = d2;
                break;
            }
        }
    }

    lastx = x - mix;
    lasty = y - miy;
    fore(p, tmp) mov.push_back({ p.first - mix, p.second - miy });
    sort(all(mov));
    mov.erase(unique(all(mov)), mov.end());
}
//---------------------------------------------------------------------------------------------------
int done[501][501][4], used[501][501];
void search() {
    rep(sy, 0, H) rep(sx, 0, W) if (B[sy][sx] == '#') {
        if (done[sy][sx][0] or done[sy][sx][1] or done[sy][sx][2] or done[sy][sx][3]) continue;
        if (B[sy - 1][sx] == '#') continue;
        if (B[sy][sx - 1] == '#') continue;

        vector<pair<int, int>> mov2;

        int x = sx, y = sy, d = 0;
        int mix = sx, miy = sy;
        while (done[y][x][d] == 0) {
            done[y][x][d] = 1;
            if (!used[y][x]) {
                mov2.push_back({ x, y });
                used[y][x] = 1;
            }
            chmin(mix, x);
            chmin(miy, y);

            rep(dd, 0, 4) {
                int d2 = (d + 3 + dd) % 4;

                int res = check(x, y, d2);
                if (res) {
                    x += dx[d2];
                    y += dy[d2];
                    d = d2;
                    break;
                }
            }
        }

        fore(p, mov2) p.first -= mix, p.second -= miy;
        sort(all(mov2));

        if (mov.size() != mov2.size()) continue;

        int n = mov.size();
        int ok = 1;
        rep(i, 0, n) if (mov[i] != mov2[i]) ok = 0;
        if (ok) {
            int x = lastx + mix;
            int y = lasty + miy;
            reverse(all(history));
            fore(com, history) {
                x += dx[(com + 2) % 4];
                y += dy[(com + 2) % 4];
            }
            printf("! %d %d\n", y, x);
            return;
        }
    }
}
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> H >> W;
    rep(y, 0, H) cin >> B[y];

    record();
    search();
}


Measured memory_bytes: 18940