#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

vector<vector<bool>> A;
vector<vector<bool>> visited;
vector<char> D = {'R', 'U', 'L', 'D'};
array<int, 4> dw = {1, 0, -1, 0};
array<int, 4> dh = {0, -1, 0, 1};

bool query(char dir){
    cout << "? " << dir << endl;
    string res;
    cin >> res;
    return res == "YES";
}

void ans(int h, int w){
    cout << "! " << h << " " << w << endl;
}

int min_hb, min_wb;

vector<vector<bool>> create(vector<array<int, 2>> route){
    int min_w = route[0][1], min_h = route[0][0], max_w = route[0][1], max_h = route[0][0];
    for (const auto &r: route){
        int w = r[1];
        int h = r[0];
        min_w = min(min_w, w);
        min_h = min(min_h, h);
        max_w = max(max_w, w);
        max_h = max(max_h, h);
    }
    vector<vector<bool>> M(max_h - min_h + 1, vector<bool>(max_w - min_w + 1));
    for (const auto &r: route){
        M[r[0] - min_h][r[1] - min_w] = true;
    }
    min_hb = min_h;
    min_wb = min_w;

    return M;
}

tuple<int, int> get_min(const vector<array<int, 2>> &route){
    int min_w = route[0][1];
    int min_h = route[0][0];
    for (const auto &r: route){
        int w = r[1];
        int h = r[0];
        min_w = min(min_w, w);
        min_h = min(min_h, h);
    }

    return make_tuple(min_h, min_w);
}

void dfs(int h, int w, vector<array<int, 2>> &route){
    if (visited[h][w] or !A[h][w])
        return;
    route.push_back({h, w});
    visited[h][w] = true;
    for (int d = 0; d < 4; d++){
        dfs(h + dh[d], w + dw[d], route);
    }
}

void dfs2(int h, int w, vector<array<int, 2>> &route){
    route.push_back({h, w});
    //cerr << h << " " << w << endl;
    visited[h][w] = true;
    for (int d = 0; d < 4; d++){
        int nh = h + dh[d];
        int nw = w + dw[d];
        if (visited[nh][nw])
            continue;
        if (!query(D[d]))
            continue;
        dfs2(nh, nw, route);
        query(D[(d + 2) % 4]);
    }
}

void debug(vector<vector<bool>> &A){
    for (const auto &a: A){
        for (const auto &b: a)
            cerr << b << " ";
        cerr << endl;
    }
}

signed main(){
    ios::sync_with_stdio(false);
	cin.tie(0);
    cout << fixed << setprecision(20);
    int H, W;
    cin >> H >> W;
    A.resize(H, vector<bool>(W));
    for (int i = 0; i < H; i++){
        string s;
        cin >> s;
        for (int j = 0; j < W; j++){
            A[i][j] = s[j] == '#';
        }
    }

    vector<array<int, 2>> R;
    visited.resize(4 * H, vector<bool>(4 * W));
    dfs2(2 * H, 2 * W, R);
    auto M = create(R);

    for (auto &v: visited){
        fill(v.begin(), v.end(), false);
    }
    //debug(M);

    for (int h = 0; h < H; h++){
        for (int w = 0; w < W; w++){
            if (visited[h][w] or !A[h][w])
                continue;
            vector<array<int, 2>> route;
            dfs(h, w, route);
            auto B = create(route);
            //debug(B);
            if (M == B){
                //debug(B);
                int min_ha, min_wa, min_hb, min_wb;
                tie(min_ha, min_wa) = get_min(R);
                tie(min_hb, min_wb) = get_min(route);
                ans(min_hb + 2 * H - min_ha, min_wb + 2 * W - min_wa);
            }
        }
    }
    
}


Measured memory_bytes: 32084