#include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto& (a): (b))
#define all(v) (v).begin(),(v).end()
#define len(v) (int)(v).size()
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define cmx(x,y) x=max(x,y)
#define cmn(x,y) x=min(x,y)
#define fi first
#define se second
#define pb push_back
#define show(x) cout<<#x<<" = "<<(x)<<endl
#define spair(p) cout<<#p<<": "<<p.fi<<" "<<p.se<<endl
#define sar(a,n) cout<<#a<<":";rep(pachico,n)cout<<" "<<a[pachico];cout<<endl
#define svec(v) cout<<#v<<":";rep(pachico,v.size())cout<<" "<<v[pachico];cout<<endl
#define svecp(v) cout<<#v<<":";each(pachico,v)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl
#define sset(s) cout<<#s<<":";each(pachico,s)cout<<" "<<pachico;cout<<endl
#define smap(m) cout<<#m<<":";each(pachico,m)cout<<" {"<<pachico.first<<":"<<pachico.second<<"}";cout<<endl

using namespace std;

typedef pair<short,short> P;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<double> vd;
typedef vector<P> vp;
typedef vector<string> vs;

const int MAX_N = 505;

char c[] = {'D', 'L', 'U', 'R'};
short dx[] = {1,0,-1,0};
short dy[] = {0,-1,0,1};

short mp[2*MAX_N][2*MAX_N];

void dfs(short x, short y){
    rep(i,4){
        short nx = x + dx[i], ny = y + dy[i];
        if(!mp[nx][ny]){
            cout << "? " << c[i] << "\n";
            string s;
            cin >> s;
            if(s == "YES"){
                mp[nx][ny] = 2;
                dfs(nx, ny);
                cout << "? " << c[(i+2)%4] << "\n";
                cin >> s;
            }else{
                mp[nx][ny] = 3;
            }
        }
    }
}

short h, w;
bool used[MAX_N][MAX_N];
string s[MAX_N];
vector<P> eda;

void dfs(int& id, short x, short y)
{
    used[x][y] = true;
    id++;
    rep(i,4){
        short nx = x + dx[i], ny = y + dy[i];
        if(nx >= 0 && nx < h && ny >= 0 && ny < w && s[nx][ny] == '#'){
            if(!used[nx][ny]){
                dfs(id,nx,ny);
            }
        }
    }
}

bool ch[2*MAX_N][2*MAX_N];
P pos[MAX_N*MAX_N];
int cnt[MAX_N*MAX_N];
vector<short> opr;

void dfs(P p)
{
    ch[p.fi][p.se] = true;
    rep(i,4){
        short nx = p.fi + dx[i], ny = p.se + dy[i];
        short val = mp[nx][ny];
        if(val >= 1 && val <= 2){
            if(!ch[nx][ny]){
                opr.pb(i);
                dfs(P(nx, ny));
                opr.pb((i+2)%4);
            }
        }
    }
}

bool dfs(int& id, P p)
{
    if(id == len(opr)) return true;
    short nx = p.fi + dx[opr[id]], ny = p.se + dy[opr[id]];
    if(nx >= 0 && nx < h && ny >= 0 && ny < w && s[nx][ny] == '#'){
        id++;
        return dfs(id, P(nx, ny));
    }else{
        return false;
    }
}

int main()
{
    mp[MAX_N][MAX_N] = 1;
    cin >> h >> w;
    rep(i,h){
        cin >> s[i];
    }
    int bue = 0;
    rep(i,h){
        rep(j,w){
            if(!used[i][j] && s[i][j] == '#'){
                eda.clear();
                int id = 0;
                dfs(id, i, j);
                cnt[bue] = id;
                pos[bue] = P(i, j);
                bue++;
            }
        }
    }
    dfs(MAX_N, MAX_N);
    P mn = {2*MAX_N, 2*MAX_N};
    int num = 0;
    rep(i,2*MAX_N){
        rep(j,2*MAX_N){
            if(mp[i][j] >= 1 && mp[i][j] <= 2){
                num++, cmn(mn, P(i,j));
            }
        }
    }
    dfs(mn);
    // sar(cnt, bue);
    // svec(opr);
    rep(i,bue){
        int id = 0;
        if(num == cnt[i] && dfs(id, pos[i])){
            cout << "! " << pos[i].fi+MAX_N+-mn.fi << " " << pos[i].se+MAX_N-mn.se << "\n";
            return 0;
        }
    }
    return 0;
}



Measured memory_bytes: 42604