#include <bits/stdc++.h>

#define rep(i, n) for(int i = 0 ; i < (int)(n) ; i++)
typedef long long ll;
typedef long double Double;

namespace stream {
    template<class T>
    class Stream {
        std::vector<T> instance;
    public:

        Stream(const std::vector<T> &instance) : instance(instance) {}


        template<class F>
        auto filter(const F &func) {
            return filterPrivate([&](const T &t, int &idx) { return func(t); });
        }

        template<class F>
        auto filterWithIndex(const F &func) {
            return filterPrivate(func);
        }

        template<class F>
        auto map(const F &func) {
            return mapPrivate([&](const T &t, int &idx) { return func(t); });
        }

        template<class F>
        auto mapWithIndex(const F &func) {
            return mapPrivate(func);
        }

        template<class F, class R>
        R reduce(const F &func, const R &init_value) {
            R ans = init_value;
            for (int i = 0; i < instance.size(); i++) {
                ans = func(ans, instance[i]);
            }
            return ans;
        }

        template<class F>
        Stream<T> sort(F cmp) {
            std::vector<T> v = instance;
            std::sort(v.begin(), v.end(), cmp);
            return Stream<T>(v);
        }

        Stream<T> sort() {
            std::vector<T> v = instance;
            std::sort(v.begin(), v.end());
            return Stream<T>(v);
        }

        Stream<T> sort_reversed() {
            std::vector<T> v = instance;
            std::sort(v.rbegin(), v.rend());
            return Stream<T>(v);
        }

        Stream<T> unique() {
            std::unordered_set<T> existing;
            std::vector<T> ans;
            for (auto &&i : instance) {
                if (existing.count(i)) { continue; }
                existing.insert(i);
                ans.push_back(i);
            }
            return Stream<T>(ans);
        }

        unsigned long count() {
            return instance.size();
        }

        T sum() {
            return std::accumulate(instance.begin(), instance.end(), T());
        }

        std::vector<T> collect() {
            return instance;
        }

        std::set<T> toSet() {
            return std::set<T>(instance.begin(), instance.end());
        }

    private:
        template<class F>
        Stream<T> filterPrivate(const F &func) {
            std::vector<T> ans;

            for (int i = 0; i < instance.size(); i++) {
                if (func(instance[i], i)) {
                    ans.push_back(instance[i]);
                }
            }
            return Stream<T>(ans);
        }

        template<class F>
        auto mapPrivate(const F &func) {
            using R = typename std::result_of<F(T, int)>::type;
            std::vector<R> ans;
            for (int i = 0; i < instance.size(); i++) {
                ans.push_back(func(instance[i], i));
            }
            return Stream<R>(ans);
        }

    };

    template<class T>
    Stream<T> _(const std::vector<T> &instance) {
        return Stream<T>(instance);
    };

    template<class T>
    Stream<T> _(const std::set<T> &instance) {
        return Stream<T>(std::vector<T>(instance.begin(), instance.end()));
    };

    template<class T, class U>
    Stream<std::pair<T, U>> _(const std::vector<T> &a, std::vector<U> &b) {
        const unsigned long &size = std::min(a.size(), b.size());
        std::vector<std::pair<T, U>> zipped;
        return _(zipped);
    }

    Stream<int> range(int a, int b) {
        if (a >= b) return Stream<int>(std::vector<int>());
        std::vector<int> ans(b - a);
        for (int i = 0; i < b - a; i++)
            ans[i] = a + i;
        return Stream<int>(ans);
    }

    Stream<int> range(int n) {
        return range(0, n);
    }
}

namespace io {
    template<class T>
    void read(std::vector<T> &v) {
        for (int i = 0; i < v.size(); i++) std::cin >> v[i];
    }

    std::vector<int> readIntArray(int n) {
        std::vector<int> a(n);
        read(a);
        return a;
    }

    long long readLong() {
        long long x;
        std::cin >> x;
        return x;
    }

    int readInt() {
        long long x = readLong();
        assert(x >= INT_MIN && x <= INT_MAX);
        return (int) x;
    }

    std::string readWord() {
        std::string x;
        std::cin >> x;
    }

    template<class T>
    void output(const std::vector<T> &v, char delimiter = ' ') {
        if (v.size() > 0) {
            std::cout << v[0];
            for (int i = 1; i < v.size(); i++) {
                std::cout << delimiter << v[i];
            }
        }
        std::cout << std::endl;
    }

    template<class T>
    void output(const T &v) {
        std::cout << v << std::endl;
    }

    void output(double x) {
        printf("%.10lf\n", x);
    }
};

using namespace std;
using namespace stream;
using namespace io;

struct P {
    P(int x, int y) : x(x), y(y) {}

    bool operator==(const P &rhs) const {
        return x == rhs.x &&
               y == rhs.y;
    }

    bool operator!=(const P &rhs) const {
        return !(rhs == *this);
    }

    bool operator<(const P &rhs) const {
        if (x < rhs.x)
            return true;
        if (rhs.x < x)
            return false;
        return y < rhs.y;
    }

    bool operator>(const P &rhs) const {
        return rhs < *this;
    }

    bool operator<=(const P &rhs) const {
        return !(rhs < *this);
    }

    bool operator>=(const P &rhs) const {
        return !(*this < rhs);
    }

    int x, y;
};


bool ask(char &i, P p, bool force);


bool already[1010][1010];


vector<P> lands;
int H, W;
string dirs = "RULD";

void dfs(const P &cur, const P &prev, char backDir) {
    lands.push_back(cur);
    P neighbors[] = {P(cur.x + 1, cur.y), P(cur.x, cur.y - 1), P(cur.x - 1, cur.y), P(cur.x, cur.y + 1)};

    for (int i = 0; i < 4; i++) {
        if (neighbors[i] == prev) continue;
        if (ask(dirs[i], neighbors[i], false)) {
            dfs(neighbors[i], cur, dirs[(i + 2) % 4]);
        }
    }
    if (backDir != '-') {
        ask(backDir, prev, true);
    }
}

char tmp[128];

bool ask(char &i, P p, bool force) {
    if (!force) {
        if (already[p.y + 505][p.x + 505]) return false;
    }
    printf("? %c\n", i);
    fflush(stdout);
    scanf("%s", tmp);
    already[p.y + 505][p.x + 505] = true;
    return tmp[0] == 'Y';
}

char field[500][500];

vector<P> tmpLands;

void lastDfs(P cur) {

    if (cur.y < 0 || cur.y >= H || cur.x < 0 || cur.x >= W || field[cur.y][cur.x] == '.') return;
    field[cur.y][cur.x] = '.';
    tmpLands.push_back(cur);
    P neighbors[] = {P(cur.x + 1, cur.y), P(cur.x, cur.y - 1), P(cur.x - 1, cur.y), P(cur.x, cur.y + 1)};
    for (int i = 0; i < 4; i++) {
        lastDfs(neighbors[i]);
    }

}

P normalize(vector<P> &l) {
    sort(l.begin(), l.end());
    P p = l[0];
    for (int i = (int) (l.size() - 1); i >= 0; i--) {
//        cout << "(" << l[i].x << " " << l[i].y << ")" << endl << endl;
        l[i] = P(l[i].x - l[0].x, l[i].y - l[0].y);
    }
    return p;
}

int main() {
    lands.reserve(250000);
    cin >> H >> W;
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            scanf(" %c", &field[i][j]);
        }
    }
    already[+505][+505] = true;
    dfs(P(0, 0), P(-1, -1), '-');


    tmpLands.reserve(250000);

    P offsetOrg = normalize(lands);
//    cout << offsetOrg.y << " " << offsetOrg.x << endl;
    for (int i = H - 1; i >= 0; i--) {
        for (int j = W - 1; j >= 0; j--) {
            if (field[i][j] == '#') {
                tmpLands.clear();
                lastDfs(P(j, i));
                if (tmpLands.size() == lands.size()) {
                    auto offset = normalize(tmpLands);
                    if (tmpLands == lands) {
                        int x = offset.x - offsetOrg.x;
                        int y = offset.y - offsetOrg.y;

                        printf("! %d %d\n", y, x);
                        fflush(stdout);
                        return 0;
                    }
                }
            }
        }
    }


}


Measured memory_bytes: 30408