#include<bits/stdc++.h>
#define pii pair<int,int>
#define fi first
#define se second
using namespace std;
pii ask(string s){
cout << "? " << s << endl;
int x, y; cin >> x >> y;
return {x,y};
}
bool ini(int n, int m){
string s;
for(int i=0;i<m;i++) s.push_back('>');
for(int i=0;i<n;i++) s.push_back('v');
pii p=ask(s);
if(p.fi!=n-1){
cout << "! " << p.fi+1 << ' ' << m-1 << endl;
return true;
}
if(p.se!=m-1){
cout << "! " << 0 << ' ' << p.se+1 << endl;
return true;
}
return false;
}
int main(){
int n, m; cin >> n >> m;
if(ini(n,m)) return 0;
string s="", r1="^>v>v", r2="^<<v";
for(int i=1;i<=m;i++) s.push_back('>');
s.push_back('v');
for(int i=1;i<n;i++){
for(int j=1;j<m-1;j++) s.push_back('<');
s=s+r2;
for(int j=1;j<=m-1;j++) s.push_back('>');
s=s+r1;
}
pii p=ask(s);
if(!p.se) cout << "! " << p.fi+1 << ' ' << p.se << endl;
else cout << "! " << p.fi << ' ' << p.se-1 << endl;
}